diff options
author | Jeremy Allison <jra@samba.org> | 2004-04-06 23:01:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:08 -0500 |
commit | 1db9257c953c93c3f26596a535e4f26b609e7955 (patch) | |
tree | 6113771ac0ec30fd0cb67d243a07f5844a5c6145 /source3/smbd/nttrans.c | |
parent | 9d458e45c8979bbfa081722b379abba9db922bba (diff) | |
download | samba-1db9257c953c93c3f26596a535e4f26b609e7955.tar.gz samba-1db9257c953c93c3f26596a535e4f26b609e7955.tar.bz2 samba-1db9257c953c93c3f26596a535e4f26b609e7955.zip |
r96: Stupid f&%'n UNIX extensions.... SETPATHINFO
normally takes as it's param entry the filename to
be acted upon.... Unless it's UNIX extensions create
hardlink, or UNIX extensions create symlink. Then it's
param -> newfile name
data -> oldfile name.
This caused me to stuff them up in 3.0.2 (and the
client commands link and symlink). Fixed them, everything
is now called oldname and newname - thus specifying which
name should already exist (hint - the old one...) and which
will be created (newname).
Jeremy.
(This used to be commit 21cc6ab7e8a41160a3e2970623ade7445b5214d6)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r-- | source3/smbd/nttrans.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index c9cc44627d..6ba74d5d50 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1500,7 +1500,7 @@ int reply_ntrename(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize) { int outsize = 0; - pstring name; + pstring oldname; pstring newname; char *p; NTSTATUS status; @@ -1515,13 +1515,13 @@ int reply_ntrename(connection_struct *conn, } p = smb_buf(inbuf) + 1; - p += srvstr_get_path(inbuf, name, p, sizeof(name), 0, STR_TERMINATE, &status); + p += srvstr_get_path(inbuf, oldname, p, sizeof(oldname), 0, STR_TERMINATE, &status); if (!NT_STATUS_IS_OK(status)) { END_PROFILE(SMBntrename); return ERROR_NT(status); } - if( strchr_m(name, ':')) { + if( strchr_m(oldname, ':')) { /* Can't rename a stream. */ END_PROFILE(SMBntrename); return ERROR_NT(NT_STATUS_ACCESS_DENIED); @@ -1534,15 +1534,15 @@ int reply_ntrename(connection_struct *conn, return ERROR_NT(status); } - RESOLVE_DFSPATH(name, conn, inbuf, outbuf); + RESOLVE_DFSPATH(oldname, conn, inbuf, outbuf); RESOLVE_DFSPATH(newname, conn, inbuf, outbuf); - DEBUG(3,("reply_ntrename : %s -> %s\n",name,newname)); + DEBUG(3,("reply_ntrename : %s -> %s\n",oldname,newname)); if (rename_type == RENAME_FLAG_RENAME) { - status = rename_internals(conn, name, newname, attrs, False); + status = rename_internals(conn, oldname, newname, attrs, False); } else { - status = hardlink_internals(conn, name, newname); + status = hardlink_internals(conn, oldname, newname); } if (!NT_STATUS_IS_OK(status)) { |