s3: Change some filename_convert to pass in NULL for char **fname argument
authorTim Prouty <tprouty@samba.org>
Wed, 1 Jul 2009 23:15:52 +0000 (16:15 -0700)
committerTim Prouty <tprouty@samba.org>
Mon, 6 Jul 2009 22:38:41 +0000 (15:38 -0700)
source3/rpc_server/srv_srvsvc_nt.c
source3/smbd/nttrans.c
source3/smbd/reply.c
source3/smbd/smb2_create.c
source3/smbd/trans2.c

index 070f7fd0ca262a5bc98f6ee5622b0956b27bf37d..44acf4d647eb322d230764c761d423b91fc48abe 100644 (file)
@@ -2042,7 +2042,6 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
        connection_struct *conn = NULL;
        struct sec_desc_buf *sd_buf = NULL;
        files_struct *fsp = NULL;
-       char *fname = NULL;
        int snum;
        char *oldcwd = NULL;
 
@@ -2072,7 +2071,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
                                        false,
                                        r->in.file,
                                        &smb_fname,
-                                       &fname);
+                                       NULL);
        if (!NT_STATUS_IS_OK(nt_status)) {
                werr = ntstatus_to_werror(nt_status);
                goto error_exit;
@@ -2174,7 +2173,6 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
        char *oldcwd = NULL;
        struct security_descriptor *psd = NULL;
        uint32_t security_info_sent = 0;
-       char *fname = NULL;
 
        ZERO_STRUCT(st);
 
@@ -2202,7 +2200,7 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
                                        false,
                                        r->in.file,
                                        &smb_fname,
-                                       &fname);
+                                       NULL);
        if (!NT_STATUS_IS_OK(nt_status)) {
                werr = ntstatus_to_werror(nt_status);
                goto error_exit;
index c65cbf851b2d333a6440ea02c872db4ead2174fa..add0b40f2efaa8956ba0cfd3aebfb27a766473fd 100644 (file)
@@ -549,7 +549,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
                                req->flags2 & FLAGS2_DFS_PATHNAMES,
                                fname,
                                &smb_fname,
-                               &fname);
+                               NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@@ -1030,7 +1030,7 @@ static void call_nt_transact_create(connection_struct *conn,
                                req->flags2 & FLAGS2_DFS_PATHNAMES,
                                fname,
                                &smb_fname,
-                               &fname);
+                               NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
index d7eaaa8a2c249b7a302056a9a2af0982e816300d..e37cdcb6b4b81083b02a6e7d855e3df700220c9f 100644 (file)
@@ -994,7 +994,7 @@ void reply_checkpath(struct smb_request *req)
                                req->flags2 & FLAGS2_DFS_PATHNAMES,
                                name,
                                &smb_fname,
-                               &name);
+                               NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@@ -2095,7 +2095,7 @@ void reply_mknew(struct smb_request *req)
                                req->flags2 & FLAGS2_DFS_PATHNAMES,
                                fname,
                                &smb_fname,
-                               &fname);
+                               NULL);
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
                        reply_botherror(req,
@@ -2109,7 +2109,8 @@ void reply_mknew(struct smb_request *req)
 
        if (fattr & aVOLID) {
                DEBUG(0,("Attempt to create file (%s) with volid set - "
-                       "please report this\n", fname));
+                        "please report this\n",
+                        smb_fname_str_dbg(smb_fname)));
        }
 
        if(req->cmd == SMBmknew) {
@@ -2227,7 +2228,7 @@ void reply_ctemp(struct smb_request *req)
                                req->flags2 & FLAGS2_DFS_PATHNAMES,
                                fname,
                                &smb_fname,
-                               &fname);
+                               NULL);
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
                        reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -5197,7 +5198,7 @@ void reply_mkdir(struct smb_request *req)
                                 req->flags2 & FLAGS2_DFS_PATHNAMES,
                                 directory,
                                 &smb_dname,
-                                &directory);
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
                        reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
index 2c790775072e978ebff50327ab0e35e76d95f298..a936a0892e466e308b4727a10b863718ec91f38c 100644 (file)
@@ -316,8 +316,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
                }
                info = FILE_WAS_CREATED;
        } else {
-               char *fname = NULL;
-
                /* these are ignored for SMB2 */
                in_create_options &= ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
                in_create_options &= ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */
@@ -327,7 +325,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
                                        smbreq->flags2 & FLAGS2_DFS_PATHNAMES,
                                        in_name,
                                        &smb_fname,
-                                       &fname);
+                                       NULL);
                if (!NT_STATUS_IS_OK(status)) {
                        tevent_req_nterror(req, status);
                        goto out;
index a6440d574f2e64f5c90246ef92d5a76bd055edab..dfb682ee2120de68f5373e8780fcabe487cee370 100644 (file)
@@ -5413,7 +5413,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
                                req->flags2 & FLAGS2_DFS_PATHNAMES,
                                oldname,
                                &smb_fname_old,
-                               &oldname);
+                               NULL);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -7347,7 +7347,7 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
                                req->flags2 & FLAGS2_DFS_PATHNAMES,
                                directory,
                                &smb_dname,
-                               &directory);
+                               NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {