From a80a96b74514b3bf800a8a22da11076568363cab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Jun 2001 19:29:57 +0000 Subject: Added sys_acl_delete_def_file() - needed as part of NT ACL editing fix. Will add changes for other supported ACL systems shortly (Herb, I may need help with the IRIX one). Jeremy. (This used to be commit a8532b193d1fe123155a69dd70e433f8fc312bfc) --- source3/lib/sysacls.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c index d1b6e58b40..cc0c70aa3e 100644 --- a/source3/lib/sysacls.c +++ b/source3/lib/sysacls.c @@ -45,8 +45,9 @@ extern int DEBUGLEVEL; int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual) int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset) int sys_acl_valid( SMB_ACL_T theacl ) - int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) + int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) int sys_acl_set_fd( int fd, SMB_ACL_T theacl) + int sys_acl_delete_def_file(const char *path) This next one is not POSIX complient - but we *have* to have it ! More POSIX braindamage. @@ -160,7 +161,7 @@ int sys_acl_valid( SMB_ACL_T theacl ) return acl_valid(theacl); } -int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) { return acl_set_file(name, acltype, theacl); } @@ -170,6 +171,11 @@ int sys_acl_set_fd( int fd, SMB_ACL_T theacl) return acl_set_fd(fd, theacl); } +int sys_acl_delete_def_file(const char *name) +{ + return acl_delete_def_file(name); +} + int sys_acl_free_text(char *text) { return acl_free(text); @@ -659,7 +665,7 @@ int sys_acl_valid(SMB_ACL_T acl_d) return 0; } -int sys_acl_set_file(char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d) +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d) { struct stat s; struct acl *acl_p; @@ -1003,7 +1009,7 @@ int sys_acl_valid(SMB_ACL_T acl_d) return acl_valid(acl_d->aclp); } -int sys_acl_set_file(char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d) +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d) { return acl_set_file(name, type, acl_d->aclp); } @@ -1076,7 +1082,7 @@ int sys_acl_valid( SMB_ACL_T theacl ) return acl_valid(theacl); } -int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) { return acl_set_file(name, acltype, theacl); } @@ -1914,7 +1920,7 @@ int sys_acl_valid( SMB_ACL_T theacl ) return(0); } -int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) { struct acl_entry_link *acl_entry_link = NULL; struct acl *file_acl = NULL; @@ -2234,7 +2240,7 @@ int sys_acl_valid( SMB_ACL_T theacl ) return -1; } -int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) { errno = ENOSYS; return -1; @@ -2246,6 +2252,12 @@ int sys_acl_set_fd( int fd, SMB_ACL_T theacl) return -1; } +int sys_acl_delete_def_file(const char *name) +{ + errno = ENOSYS; + return -1; +} + int sys_acl_free_acl(SMB_ACL_T the_acl) { errno = ENOSYS; -- cgit