Re: hdiutil behavior in automated scripts
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Output from id: uid=70(www) gid=70(www) euid=0(root) groups=70(www) Are there any pointers to hdiutil's behavior in environments like these? Michael Am 01.06.2009 um 20:14 schrieb Hado Hein: Brian Bergstrand <brian@classicalguitar.net> wrote: _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Unfortunately, setuid did not show any signifcant effects. Calling "id" shows the euid of root, but hdiutil (or "DIHLDiskImageCreate") still fails with the same error 6 (device not configured). Currently tested configuration: PHP uses the backtick operator to call a C compiled executable with setuid set, which uses execl() to call the shell script. This shell script then executes id and hdiutil... Output from hdiutil (echo -n "pass" | /usr/bin/hdiutil create -debug - verbose -encryption -stdinpass -size 600k "/Users/webuser/m-m-sports/ tmp/image_${date_string}.dmg" -fs HFS+): <CFDictionary 0x314bd0 [0xa080b1c0]>{type = mutable, count = 5, capacity = 8, pairs = ( 2 : <CFString 0x45e74 [0xa080b1c0]>{contents = "debug"} = <CFBoolean 0xa080b88c [0xa080b1c0]>{value = true} 3 : <CFString 0x45c94 [0xa080b1c0]>{contents = "create-content-spec"} = <CFDictionary 0x314c30 [0xa080b1c0]>{type = mutable, count = 1, capacity = 4, pairs = ( 3 : <CFString 0x45ca4 [0xa080b1c0]>{contents = "nbi-spec"} = <CFDictionary 0x314c60 [0xa080b1c0]>{type = mutable, count = 1, capacity = 4, pairs = ( 0 : <CFString 0x45cf4 [0xa080b1c0]>{contents = "filesystem"} = <CFString 0x314e00 [0xa080b1c0]>{contents = "HFS+"} )} )} 5 : <CFString 0x45e84 [0xa080b1c0]>{contents = "verbose"} = <CFBoolean 0xa080b88c [0xa080b1c0]>{value = true} 6 : <CFString 0x45c74 [0xa080b1c0]>{contents = "agent"} = <CFString 0x45c64 [0xa080b1c0]>{contents = "hdiutil"} 9 : <CFString 0x45c84 [0xa080b1c0]>{contents = "create-target-spec"} = <CFDictionary 0x314c00 [0xa080b1c0]>{type = mutable, count = 3, capacity = 4, pairs = ( 2 : <CFString 0x45dc4 [0xa080b1c0]>{contents = "url"} = <CFURL 0x314de0 [0xa080b1c0]>{type = 0, string = /Users/webuser/m-m-sports/ tmp/image_20090406-114948.dmg, base = (null)} 3 : <CFString 0x45e64 [0xa080b1c0]>{contents = "image-options"} = <CFDictionary 0x314940 [0xa080b1c0]>{type = mutable, count = 2, capacity = 4, pairs = ( 0 : <CFString 0x45f54 [0xa080b1c0]>{contents = "passphrase"} = <CFString 0x3149c0 [0xa080b1c0]>{contents = "pass"} 2 : <CFString 0x45f44 [0xa080b1c0]>{contents = "encryption-class"} = <CFString 0x3149a0 [0xa080b1c0]>{contents = "CEncryptedEncoding"} )} 4 : <CFString 0x45cb4 [0xa080b1c0]>{contents = "sectors"} = <CFNumber 0x314d50 [0xa080b1c0]>{value = +1200, type = kCFNumberSInt64Type} )} )} 2009-06-04 11:49:49.359 hdiutil[17809] helperClass is DIHelperNBI 2009-06-04 11:49:49.378 hdiutil[17809] error: unable to set up framework server. hdiutil: create: returning 6 hdiutil: create failed - Gerät wurde nicht konfiguriert DIHLDiskImageCreate() returned 6 I don't know if there's a way to get around this. For cgi/bin you can simply set setuid on the executuable file. It works like everywhere. This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Plagge