diff options
author | Jeremy Allison <jra@samba.org> | 2003-08-12 04:52:11 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-08-12 04:52:11 +0000 |
commit | 9bc0e4fe04c4134add428c889d316bd5ee4fb6e9 (patch) | |
tree | eb1c98384ead4730c2557e23c7650048475fabcc /source | |
parent | 8b263c2fda89ff6aa2dc3a60460c5d46cf0814c6 (diff) | |
download | samba-9bc0e4fe04c4134add428c889d316bd5ee4fb6e9.tar.gz samba-9bc0e4fe04c4134add428c889d316bd5ee4fb6e9.tar.xz samba-9bc0e4fe04c4134add428c889d316bd5ee4fb6e9.zip |
Fix another error code return against Samba4 test suite... Don't allow
a path above root.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r-- | source/smbd/reply.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 869123a1fe3..4ea1792885a 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1218,6 +1218,10 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype) if (!CAN_WRITE(conn)) return NT_STATUS_MEDIA_WRITE_PROTECTED; + /* Can't delete the root. */ + if (strequal(fname, "./..") || strequal(fname, "./../")) + return NT_STATUS_OBJECT_PATH_SYNTAX_BAD; + if (SMB_VFS_LSTAT(conn,fname,&sbuf) != 0) return NT_STATUS_OBJECT_NAME_NOT_FOUND; |