summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-21 13:03:46 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-21 13:03:46 +0000
commitbb9ca7fd648d8a507ade0f15ac84251eb13a8f02 (patch)
tree07b4b39ccd9676562ada207cf4af685ebda37890 /source3
parent8f13fb0bdcb77d44091fa5bb4ab60fd1ac5650c6 (diff)
downloadsamba-bb9ca7fd648d8a507ade0f15ac84251eb13a8f02.tar.gz
samba-bb9ca7fd648d8a507ade0f15ac84251eb13a8f02.tar.bz2
samba-bb9ca7fd648d8a507ade0f15ac84251eb13a8f02.zip
check for EPERM or EACCESS in file_utime()
(This used to be commit afd7592ffd74fbc77f4b177b007291df95f418ef)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c7
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