diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-21 13:03:46 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-21 13:03:46 +0000 |
commit | bb9ca7fd648d8a507ade0f15ac84251eb13a8f02 (patch) | |
tree | 07b4b39ccd9676562ada207cf4af685ebda37890 | |
parent | 8f13fb0bdcb77d44091fa5bb4ab60fd1ac5650c6 (diff) | |
download | samba-bb9ca7fd648d8a507ade0f15ac84251eb13a8f02.tar.gz samba-bb9ca7fd648d8a507ade0f15ac84251eb13a8f02.tar.bz2 samba-bb9ca7fd648d8a507ade0f15ac84251eb13a8f02.zip |
check for EPERM or EACCESS in file_utime()
(This used to be commit afd7592ffd74fbc77f4b177b007291df95f418ef)
-rw-r--r-- | source3/smbd/server.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 28364d9c0c..5f925df687 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -318,10 +318,15 @@ int file_utime(int cnum, char *fname, struct utimbuf *times) struct stat sb; int ret = -1; + errno = 0; + if(sys_utime(fname, times) == 0) return 0; - if((errno != EPERM) || !lp_dos_filetimes(SNUM(cnum))) + if((errno != EPERM) && (errno != EACCESS)) + return -1; + + if(!lp_dos_filetimes(SNUM(cnum))) return -1; /* We have permission (given by the Samba admin) to |