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/open.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/open.c')
-rw-r--r-- | source3/smbd/open.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index afcaeff1ae..c601121459 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -194,9 +194,12 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, * Take care of inherited ACLs on created files. JRA. */ - if ((flags & O_CREAT) && (conn->vfs_ops.fchmod_acl != NULL)) - conn->vfs_ops.fchmod_acl(fsp, fsp->fd, mode); - + if ((flags & O_CREAT) && (conn->vfs_ops.fchmod_acl != NULL)) { + int saved_errno = errno; /* We might get ENOSYS in the next call.. */ + if (conn->vfs_ops.fchmod_acl(fsp, fsp->fd, mode) == -1 && errno == ENOSYS) + errno = saved_errno; /* Ignore ENOSYS */ + } + return True; } |