diff options
author | Jeremy Allison <jra@samba.org> | 2004-03-03 23:14:21 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2004-03-03 23:14:21 +0000 |
commit | 1fcc87b8148be2ca7fa73f18a19c677c3f4fbab4 (patch) | |
tree | a0cee199bb887cf531fdb6fd00e0cedbbf89c4c9 /source3/smbd/nttrans.c | |
parent | 74307e350635a195ebaa4841651f555c27fbcff4 (diff) | |
download | samba-1fcc87b8148be2ca7fa73f18a19c677c3f4fbab4.tar.gz samba-1fcc87b8148be2ca7fa73f18a19c677c3f4fbab4.tar.bz2 samba-1fcc87b8148be2ca7fa73f18a19c677c3f4fbab4.zip |
Added client "hardlink" commant to test doing NT rename with hard links.
Added hardlink_internals() code - UNIX extensions now use this too.
Jeremy.
(This used to be commit 3f2b9f10dec58d3e3ae463e3804d96052fb27a4d)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r-- | source3/smbd/nttrans.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index ac355ecd51..079027a5c5 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1522,7 +1522,7 @@ int reply_ntrename(connection_struct *conn, START_PROFILE(SMBntrename); - if (rename_type != RENAME_FLAG_RENAME) { + if ((rename_type != RENAME_FLAG_RENAME) && (rename_type != RENAME_FLAG_HARD_LINK)) { END_PROFILE(SMBntrename); return ERROR_NT(NT_STATUS_ACCESS_DENIED); } @@ -1552,7 +1552,12 @@ int reply_ntrename(connection_struct *conn, DEBUG(3,("reply_ntrename : %s -> %s\n",name,newname)); - status = rename_internals(conn, name, newname, attrs, False); + if (rename_type == RENAME_FLAG_RENAME) { + status = rename_internals(conn, name, newname, attrs, False); + } else { + status = hardlink_internals(conn, name, newname); + } + if (!NT_STATUS_IS_OK(status)) { END_PROFILE(SMBntrename); return ERROR_NT(status); |