NSTask -launch override

  • I'm trying to implement a transparently authorized -launch method in
    NSTask. What I need to know is if I can use
    AuthorizationExecuteWithPrivileges() with the current user's default
    rights acquired when initializing the AuthorizationRef without having
    to actually authorize.

    The desired effect would be that preauthorizing would yield whether or
    not the current user needs to authorize to run the task, if they need
    to then the user will first be asked to authorize. Either way the task
    is to be run through AuthorizationExecuteWithPrivileges().

    Keith
  • On 25/09/2007, Keith Duncan <keith_duncan...> wrote:
    > I'm trying to implement a transparently authorized -launch method in
    > NSTask. What I need to know is if I can use
    > AuthorizationExecuteWithPrivileges() with the current user's default
    > rights acquired when initializing the AuthorizationRef without having
    > to actually authorize.

    I suggest you abandon this tack. Authorization should not be
    transparent, and I don't really think the semantics are compatible
    with NSTask.

    -- Finlay
  • > I suggest you abandon this tack.

    Right, if it's a bad idea I won't pursue it further.

    I do still however need a unified way of copying files to either ~/
    Library or /Library depending on wether or not the user wants to
    install the alarm sounds for all users or just themselves.

    Perhaps this isn't even a useful feature? Should I abandon it
    completely and simply copy the files to my application support folder
    in ~/Library?

    Keith
  • On 26/09/2007, Keith Duncan <keith_duncan...> wrote:
    >> I suggest you abandon this tack.
    >
    > Right, if it's a bad idea I won't pursue it further.
    >
    > I do still however need a unified way of copying files to either ~/
    > Library or /Library depending on wether or not the user wants to
    > install the alarm sounds for all users or just themselves.

    I agree to a certain extent, it would be nice if there was a simple
    way of doing this (presenting a UI somewhat similar to System
    Preferences if you double-click on an uninstalled prefPane).

    > Perhaps this isn't even a useful feature? Should I abandon it
    > completely and simply copy the files to my application support folder
    > in ~/Library?

    It's probably somewhat useful, but might not be worth the effort
    required to implement it. Your call :o)

    -- Finlay
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today