From ae7696117e81bb469fa71f9bc880f6b5aac0724e Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 3 Feb 2000 23:08:24 +0000 Subject: Put back lots of missing calls to dos_to_unix(). Thanks to aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO) (This used to be commit 176c405d2702a4245561ff56c8eac3c754a0dea3) --- source3/smbd/ipc.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'source3/smbd/ipc.c') diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 3e16dba4f5..b5a6e4ba90 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -2055,6 +2055,7 @@ static BOOL api_PrintJobInfo(connection_struct *conn,uint16 vuid,char *param,cha if (isalpha((int)*s)) { pstring name; int l = 0; + while (l<64 && *s) { if (issafe(*s)) name[l++] = *s; s++; @@ -2066,17 +2067,23 @@ static BOOL api_PrintJobInfo(connection_struct *conn,uint16 vuid,char *param,cha fsp = file_find_print(); if (fsp) { - connection_struct *fconn = fsp->conn; - unbecome_user(); - - if (!become_user(fconn,vuid) || - !become_service(fconn,True)) - break; + pstring zfrom,zto; + connection_struct *fconn = fsp->conn; + + unbecome_user(); - if (fsp->conn->vfs_ops.rename(fsp->fsp_name,name) == 0) { - string_set(&fsp->fsp_name,name); - } - break; + if (!become_user(fconn,vuid) || + !become_service(fconn,True)) + break; + + pstrcpy(zfrom, dos_to_unix(fsp->fsp_name,False)); + pstrcpy(zto, dos_to_unix(name,False)); + + if (fsp->conn->vfs_ops.rename(zfrom,zto) == 0) { + string_set(&fsp->fsp_name,name); + } + + break; } } desc.errcode=NERR_Success; -- cgit