Hi

Try this version:

#include <stdio.h>
#include <errno.h>
#include <sys/acl.h>
int
main() {
     int   convert;
     char  *acltextp = "user:bhushan:rw_";
     acl_t *aclp;

     errno = 0;
     convert = acl_fromtext(acltextp, &aclp);
     if (errno != 0) {
         perror("acl_fromtext error: ");
     }
     if (convert == 0)
         printf("converted\n");
     else
         printf("error: %d\n", convert);

     return 0;
}


When run on my system, I get:

error: 11


Looking in /usr/include/sys/acl.h I see:

#define EACL_PERM_MASK_ERROR    11              /* unknown permission */




Hope this helps- Tim

Reply via email to