Re: Folder has limited permissions.

2008-07-28 Thread Macarov Anatoli
   Problem solved.    Cod work:     NSPipe *writePipe = [NSPipe pipe];     NSFileHandle *writeHandle = [writePipe fileHandleForWriting];     NSTask *task = [[NSTask alloc] init];     NSString *command = @"/usr/libexec/authopen";     NSArray *args = [NSArray arrayWithObjects:@"-w",@"/etc/tolea.txt"

Re: Folder has limited permissions.

2008-07-28 Thread Jean-Daniel Dupas
You have to use "create and write" (-c -w) authopen -c -w /etc/tolea.txt And also to write some data by creating an other pipe and binding it to the task's standard input (and then using fileHandleForWriting). Le 28 juil. 08 à 09:46, Macarov Anatoli a écrit : This is my code, I would give

Re: Folder has limited permissions.

2008-07-28 Thread Macarov Anatoli
This is my code, I would give you an example.In documentation on authopen command-w writes data in file, but I can't do it. On 27 Jul 08, at 02:19, Macarov Anatoli wrote: > HI Andrew Farmer, > This is my cod: > > NSString *command =@"/usr/libexec/authopen" ; > NSArray *args = [NSArray

Re: Folder has limited permissions.

2008-07-25 Thread Andrew Farmer
On 25 Jul 08, at 01:55, Macarov Anatoli wrote: When user has a standard account (not administrator), he/she doesn't have rights to create a file in the Directory /Applications/. I try to create a file with the help of function authopen. This code doesn't work: FILE *pFile = popen("/usr/lib

Re: Folder has limited permissions.

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 4:55 AM, Macarov Anatoli <[EMAIL PROTECTED]> wrote: > How would be the correct way to do? Obligatory: why do you want to do this? From a user-experience point of view, putting things in /Applications is reserved for Installer.app and drag-installs using the Finder. Partic

Re: Folder has limited permissions.

2008-07-25 Thread Macarov Anatoli
When user has a standard account (not administrator), he/she doesn't have rights to create a file in the Directory /Applications/. I try to create a file with the help of function authopen. This code doesn't work: FILE *pFile = popen("/usr/libexec/authopen -stdoutpipe sys.openfile.readwritecre

Re: Folder has limited permissions.

2008-07-24 Thread Ken Thomases
On Jul 24, 2008, at 7:24 AM, Macarov Anatoli wrote: Cocoa, Obj-c. How to creat a file in the folder that has limited permissions (read- only)? This is ambiguous. Do you mean there is a folder to which the user does not have write permissions and you want to create a file within it? If s

Re: Folder has limited permissions.

2008-07-24 Thread Todd Heberlein
Well it would certainly have been a feat for them to audit launchd jobs in 10.3! :D Speaking of which, can you provide a reference? This is more than mildly intriguing to me. I filed a bug report for this about a year ago for 10.4, but I discovered it when someone complained that access to f

Re: Folder has limited permissions.

2008-07-24 Thread Kyle Sluder
On Thu, Jul 24, 2008 at 12:46 PM, Todd Heberlein <[EMAIL PROTECTED]> wrote: > Argh! Since MacOS 10.4 all processes that are spawned from launchd (and > their children) are *not* audited by Mac's audit system (BSM). Well it would certainly have been a feat for them to audit launchd jobs in 10.3! :

Re: Folder has limited permissions.

2008-07-24 Thread Todd Heberlein
http://developer.apple.com/samplecode/BetterAuthorizationSample/index.html From the page: "This involves putting the privileged code into a small, privileged helper tool that is run by launchd." Argh! Since MacOS 10.4 all processes that are spawned from launchd (and their children) are *no

Re: Folder has limited permissions.

2008-07-24 Thread Jean-Daniel Dupas
I think Apple has one, but to find it, you may have to try to search… http://developer.apple.com/samplecode/BetterAuthorizationSample/index.html Le 24 juil. 08 à 15:37, Macarov Anatoli a écrit : Someone has an example with authorization services.Le 24 juil. 08 à 14:24, Macarov Anatoli a éc

Re: Folder has limited permissions.

2008-07-24 Thread Macarov Anatoli
Someone has an example with authorization services.Le 24 juil. 08 à 14:24, Macarov Anatoli a écrit : > HI! > Cocoa, Obj-c. > How to creat a file in the folder that has limited permissions (read- > only)? > Give me example, please. You can use NSTask and /usr/libexec/authopen (and pipes) See "

Re: Folder has limited permissions.

2008-07-24 Thread Jean-Daniel Dupas
Le 24 juil. 08 à 14:24, Macarov Anatoli a écrit : HI! Cocoa, Obj-c. How to creat a file in the folder that has limited permissions (read- only)? Give me example, please. You can use NSTask and /usr/libexec/authopen (and pipes) See "man authopen" for details. If it's not enought, you have t

Folder has limited permissions.

2008-07-24 Thread Macarov Anatoli
HI! Cocoa, Obj-c. How to creat a file in the folder that has limited permissions (read-only)? Give me example, please. Вы уже с Yahoo!? Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com _