Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can I make the auth dialog for 'configure command line' say Racket rather than 'authopen'? #672

Open
spdegabrielle opened this issue May 18, 2024 · 5 comments
Assignees

Comments

@spdegabrielle
Copy link
Member

can I make the auth dialog for 'configure command line' say Racket rather than 'authopen'?

image -- feel free to ignore low priority reminder to myself to see if this can be done
@spdegabrielle spdegabrielle self-assigned this May 18, 2024
@sorawee
Copy link
Contributor

sorawee commented May 18, 2024

For Mac, one possibility is to write an AppleScript wrapper, though we have to be very careful about shell-injection attack, correct quoting, etc.

#lang racket

(define (do-it path)
  (define tmpdir (make-temporary-directory))
  (define racket.app (build-path tmpdir "Racket.app"))
  (parameterize ([current-input-port
                  (open-input-string
                   (format #<<EOF
set thePath to quoted form of ~s 
do shell script "echo " & thePath & " > /etc/paths.d/racket" with administrator privileges
EOF
                           path))])
    (system* (find-executable-path "osacompile")
             "-x" "-o" racket.app))

  (system* (build-path racket.app "Contents" "MacOS" "applet")))

(do-it "/Users/sorawee/projects/racket/racket/bin")

@rfindler
Copy link
Member

Looks like -extauth argument is designed for this purpose.

@sorawee
Copy link
Contributor

sorawee commented May 18, 2024

I don't know how to use authopen, but if -extauth works, that would be a much better approach!

@rfindler
Copy link
Member

I don't really see how to use it but if we do change the code, probably there needs to be a guard on the version of the operating system where the argument was added.

@LiberalArtist
Copy link
Contributor

From the man page, it sounds like using -extauth requires writing a serialized AuthorizationExternalForm, but I'm not familiar with the Authorization Services API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants