site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hello, all ... #include <sys/types.h> #include <sys/acl.h> #include <string> #include <iostream> #include <errno.h> using namespace std; int main( int argc, char **pcargv ) { // get file to operate on if ( argc == 2 ) { std::string strFile = pcargv[ 1 ]; // get ACL from file ... return 0; } ... and when I run it, I get: Regards, John Falling You - exploring the beauty of voice and sound http://www.fallingyou.com _______________________________________________ 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... I'm exploring the acl_* POSIX APIs on Leopard (and assuming the same code will work on TIger, please correct me if i'm wrong), and so far, all I get from acl_get_file() is error 22, "invalid argument". Here's my (very short) test, can someone tell me what i'm doing wrong? acl_t acl = acl_get_file( strFile.c_str(), ACL_TYPE_DEFAULT ); // also tried ACL_TYPE_ACCESS, same error if ( acl ) { acl_free( acl ); } else { cout << "couldn't get ACL from " << strFile.c_str() << " errno is " << errno << endl; } } pugsadilly:unittests jmzorko$ c++ acl_test.cpp -o acl_test pugsadilly:unittests jmzorko$ ./acl_test /Users/jmzorko/php4.4.7.pkg.zip couldn't get ACL from /Users/jmzorko/php4.4.7.pkg.zip errno is 22 pugsadilly:unittests jmzorko$ ./acl_test /Users/jmzorko/work/fw40/ trunk/unittests/acl_test couldn't get ACL from /Users/jmzorko/work/fw40/trunk/unittests/ acl_test errno is 22 pugsadilly:unittests jmzorko$ ./acl_test /Users/jmzorko/work/fw40/ trunk/unittests/acl_test.cpp couldn't get ACL from /Users/jmzorko/work/fw40/trunk/unittests/ acl_test.cpp errno is 22 pugsadilly:unittests jmzorko$ This email sent to site_archiver@lists.apple.com
participants (1)
-
John Michael Zorko