diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-03-13 06:37:12 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-03-13 06:37:12 +0000 |
commit | a7d2f5b06379cb0c553cd2d9a7c58e2cb8902965 (patch) | |
tree | ad5ac844283a528e46288d9c2017211b66fd6511 | |
parent | 26f63881e242947e7d4a5f5c3ce6f13305d2601e (diff) | |
download | samba-a7d2f5b06379cb0c553cd2d9a7c58e2cb8902965.tar.gz samba-a7d2f5b06379cb0c553cd2d9a7c58e2cb8902965.tar.bz2 samba-a7d2f5b06379cb0c553cd2d9a7c58e2cb8902965.zip |
converted a bunch more server functions to unicode
(This used to be commit a074600a09387c2034ffb6651abad69bdc14145e)
-rw-r--r-- | source3/smbd/reply.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 0cff1d5a56..a401be1357 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1150,9 +1150,11 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size SMB_OFF_T size=0; time_t mtime=0; BOOL bad_path = False; + char *p; START_PROFILE(SMBgetatr); - - pstrcpy(fname,smb_buf(inbuf) + 1); + + p = smb_buf(inbuf) + 1; + p += srvstr_pull(inbuf, fname, p, sizeof(fname), -1, STR_TERMINATE); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -1231,9 +1233,12 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size time_t mtime; SMB_STRUCT_STAT sbuf; BOOL bad_path = False; + char *p; + START_PROFILE(SMBsetatr); - - pstrcpy(fname,smb_buf(inbuf) + 1); + + p = smb_buf(inbuf) + 1; + p += srvstr_pull(inbuf, fname, p, sizeof(fname), -1, STR_TERMINATE); unix_convert(fname,conn,0,&bad_path,&sbuf); mode = SVAL(inbuf,smb_vwv0); @@ -1781,7 +1786,7 @@ int reply_mknew(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, com = SVAL(inbuf,smb_com); createmode = SVAL(inbuf,smb_vwv0); - pstrcpy(fname,smb_buf(inbuf)+1); + srvstr_pull(inbuf, fname, smb_buf(inbuf) + 1, sizeof(fname), -1, STR_TERMINATE); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -2046,7 +2051,7 @@ int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size dirtype = SVAL(inbuf,smb_vwv0); - pstrcpy(name,smb_buf(inbuf) + 1); + srvstr_pull(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), -1, STR_TERMINATE); RESOLVE_DFSPATH(name, conn, inbuf, outbuf); @@ -3888,10 +3893,14 @@ int reply_mv(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, in int outsize = 0; pstring name; pstring newname; + char *p; + START_PROFILE(SMBmv); - pstrcpy(name,smb_buf(inbuf) + 1); - pstrcpy(newname,smb_buf(inbuf) + 3 + strlen(name)); + p = smb_buf(inbuf) + 1; + p += srvstr_pull(inbuf, name, p, sizeof(name), -1, STR_TERMINATE); + p++; + p += srvstr_pull(inbuf, newname, p, sizeof(newname), -1, STR_TERMINATE); RESOLVE_DFSPATH(name, conn, inbuf, outbuf); RESOLVE_DFSPATH(newname, conn, inbuf, outbuf); @@ -4019,8 +4028,9 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, *directory = *mask = 0; - pstrcpy(name,smb_buf(inbuf)); - pstrcpy(newname,smb_buf(inbuf) + 1 + strlen(name)); + p = smb_buf(inbuf); + p += srvstr_pull(inbuf, name, p, sizeof(name), -1, STR_TERMINATE); + p += srvstr_pull(inbuf, newname, p, sizeof(newname), -1, STR_TERMINATE); DEBUG(3,("reply_copy : %s -> %s\n",name,newname)); |