Professional Web Applications Themes

Running a thread as a different user under cocoa - Mac Programming

I'm using cocoa and objective-C to write a front end to some command line tools which need to run as a different user (either news or root). I can sucessfully use NSTask to run the tools in a different thread, and have set up pipes so I can read the output from the tools back into my program and translate them into the GUI. The problem I have is pursuading NSTask to change the user. I can't find anything about it in the cocoa doentation. Any suggestions? //Andrew -- Replace 'news' with 'usenet' to reply. Email to 'news' is deleted ...

  1. #1

    Default Running a thread as a different user under cocoa

    I'm using cocoa and objective-C to write a front end to some command
    line tools which need to run as a different user (either news or root).

    I can sucessfully use NSTask to run the tools in a different thread, and
    have set up pipes so I can read the output from the tools back into my
    program and translate them into the GUI.

    The problem I have is pursuading NSTask to change the user. I can't find
    anything about it in the cocoa doentation.

    Any suggestions?

    //Andrew

    --
    Replace 'news' with 'usenet' to reply.
    Email to 'news' is deleted unread.
    Andrew Guest

  2. #2

    Default Re: Running a thread as a different user under cocoa

    In article <falu.demon.co.uk>,
    Andrew Cook <demon.co.uk> wrote:
     

    I think there's only a plain-C API that lets you do something like that.
    It's called "Authentication Services" or something that sounds equally
    like security.

    You may find more accurate info than my vague memory at
    <http://developer.apple.com>
    among the Q&As and the Tech Notes, (I suppose you have already searched
    the "real" doentation). This often comes up in connection with
    writing installers, so maybe a search for "installer" and "root" may
    also point you in the right direction.

    Cheers,
    -- Uli
    http://www.zathras.de
    Uli Guest

  3. #3

    Default Re: Running a thread as a different user under cocoa

    In article <t-online.com>,
    Uli Kusterer <de> wrote:
     
    >
    > I think there's only a plain-C API that lets you do something like that.
    > It's called "Authentication Services" or something that sounds equally
    > like security.
    >
    > You may find more accurate info than my vague memory at
    > <http://developer.apple.com>
    > among the Q&As and the Tech Notes, (I suppose you have already searched
    > the "real" doentation). This often comes up in connection with
    > writing installers, so maybe a search for "installer" and "root" may
    > also point you in the right direction.[/ref]

    Thanks, I shall look further and experiment.

    //Andrew

    --
    Replace 'news' with 'usenet' to reply.
    Email to 'news' is deleted unread.
    Andrew Guest

Similar Threads

  1. Reduce number of running thread under Linux
    By HNT2121 in forum Coldfusion Server Administration
    Replies: 0
    Last Post: December 30th, 11:35 AM
  2. Newbie:Using ASP.NET thread pool thread to dispatch TCP data, etc.
    By Navin Mishra in forum ASP.NET Web Services
    Replies: 0
    Last Post: March 22nd, 06:45 PM
  3. web service running on same thread
    By Joseph in forum ASP.NET Web Services
    Replies: 1
    Last Post: January 5th, 08:27 AM
  4. HttpContext.Current.User vs. Thread.CurrentPrincipal
    By Michael Ames in forum ASP.NET Security
    Replies: 1
    Last Post: November 14th, 06:47 AM
  5. Cocoa User's Group
    By GregZ in forum Mac Programming
    Replies: 1
    Last Post: September 29th, 07:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139