diff options
author | Jeremy Allison <jra@samba.org> | 2001-03-26 19:18:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-03-26 19:18:06 +0000 |
commit | e670b3564c3c12baaab0e988f155a86b9437f66e (patch) | |
tree | 3fdaeb0130850ed037f4e0a73ef1a65e75ff481d /source3/smbd/posix_acls.c | |
parent | c4cfc3629038aa6c2d57d630452c538c737d1203 (diff) | |
download | samba-e670b3564c3c12baaab0e988f155a86b9437f66e.tar.gz samba-e670b3564c3c12baaab0e988f155a86b9437f66e.tar.bz2 samba-e670b3564c3c12baaab0e988f155a86b9437f66e.zip |
smbd/posix_acls.c: Saving and restoring errno here is the wrong place. Moved it
to the places where [f]chmod_acl is called instead.
Jeremy.
(This used to be commit 641ada44ae6429761c1fd0dbcafabc69f897fac7)
Diffstat (limited to 'source3/smbd/posix_acls.c')
-rw-r--r-- | source3/smbd/posix_acls.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 325fd3b716..b7ba8e44ef 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1236,7 +1236,6 @@ static int map_acl_perms_to_permset(mode_t mode, SMB_ACL_PERMSET_T *p_permset) static void arrange_posix_perms( char *filename, canon_ace **pp_list_head) { - extern DOM_SID global_sid_World; canon_ace *list_head = *pp_list_head; canon_ace *owner_ace = NULL; canon_ace *other_ace = NULL; @@ -2126,15 +2125,11 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode) int chmod_acl(char *name, mode_t mode) { - int saved_errno = errno; SMB_ACL_T posix_acl = NULL; int ret = -1; - if ((posix_acl = sys_acl_get_file(name, SMB_ACL_TYPE_ACCESS)) == NULL) { - if (errno == ENOSYS) - errno = saved_errno; + if ((posix_acl = sys_acl_get_file(name, SMB_ACL_TYPE_ACCESS)) == NULL) return -1; - } if ((ret = chmod_acl_internals(posix_acl, mode)) == -1) goto done; @@ -2154,15 +2149,11 @@ int chmod_acl(char *name, mode_t mode) int fchmod_acl(int fd, mode_t mode) { - int saved_errno = errno; SMB_ACL_T posix_acl = NULL; int ret = -1; - if ((posix_acl = sys_acl_get_fd(fd)) == NULL) { - if (errno == ENOSYS) - errno = saved_errno; + if ((posix_acl = sys_acl_get_fd(fd)) == NULL) return -1; - } if ((ret = chmod_acl_internals(posix_acl, mode)) == -1) goto done; |