Re: Authorisation framework problems
Re: Authorisation framework problems
- Subject: Re: Authorisation framework problems
- From: "Sven A. Schmidt" <email@hidden>
- Date: Fri, 7 Feb 2003 11:23:30 +0100
Carl,
have you tried to not only unmount the directory via sudo but run the
whole asr process through sudo? You might have to set both the real and
the effective user id of asr to '0'.
I've had a similar problem with my cron frontend. Writing other user's
crontabs requires crontab to be run by root. sudo does not suffice. I
had to write a wrapper program that calls setuid(0) and then pipes
everything through to an extra NSTask.
HTH,
Sven
On Freitag, Februar 7, 2003, at 03:53 Uhr, Carl Gherardi wrote:
Hi all,
I'm writing a frontend to asr. Asr requires root privs to do a lot of
the
work required, so after some inquiry I found the authorization
framework,
and decided the installer style privs were what was necessary.
So.... I wrote 1 apps called priv which is straight out of the apple
docs
for installer and selected the path to my application called ASRfe.
That works fine - I fire up priv and I get the authentication box
enter the
admin password and ASRfe fires up. Using ps I can see ASRfe is
running as root.
So I do my thing and select the image I want to clone and the
destination
partition.
I have permissions to write to the other volume as the target
disk(partition) is erased after asr executes.
I then get an error from ASRfe
"/sbin/umount: /private/tmp/ImgVolrandomstring: Operation not permitted
/sbin/umount failed with error 256"
A quick check and this is actually /dev/disk3s2 which i'm guessing is
the
image i'm about to wipe my second partition with.
I can manually unmount this directory using sudo umount. So why cant
asr do
it running as root??
I'm lost... why on earth is this happening?
TIA
Carl
NB: Command line options i'm invoking from the frontend are (and this
also
works from a shell):
/usr/sbin/asr -source /Users/carlos/Desktop/emac.dmg -target
/Volumes/Macintosh HD -erase -noprompt
Validating target...
Validating source...
Erasing target device /dev/disk0s10...
Retrieving scan information...
Validating sizes...
/sbin/umount: /private/tmp/ImgVolrandomstring: Operation not permitted
/sbin/umount failed with error 256
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
Dr. Sven A. Schmidt
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.