s3: smbd: Remove *all* uses of lp_posix_pathnames() from open.c
authorJeremy Allison <jra@samba.org>
Tue, 22 Dec 2015 21:45:30 +0000 (13:45 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 23 Dec 2015 17:23:17 +0000 (18:23 +0100)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
source3/smbd/open.c

index d4f257c5feae9aa480737fcfabf7838acd4c2fea..3c0a7a361f0ae77c7eac5f81f80892985b33bbe1 100644 (file)
@@ -2529,7 +2529,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
        }
 
        /* this is for OS/2 long file names - say we don't support them */
-       if (!lp_posix_pathnames() && strstr(smb_fname->base_name,".+,;=[].")) {
+       if (req != NULL && !req->posix_pathnames &&
+                       strstr(smb_fname->base_name,".+,;=[].")) {
                /* OS/2 Workplace shell fix may be main code stream in a later
                 * release. */
                DEBUG(5,("open_file_ntcreate: OS/2 long filenames are not "
@@ -4828,7 +4829,8 @@ NTSTATUS get_relative_fid_filename(connection_struct *conn,
        files_struct *dir_fsp;
        char *parent_fname = NULL;
        char *new_base_name = NULL;
-       uint32_t ucf_flags = (lp_posix_pathnames() ? UCF_POSIX_PATHNAMES : 0);
+       uint32_t ucf_flags = ((req != NULL && req->posix_pathnames) ?
+                       UCF_POSIX_PATHNAMES : 0);
        NTSTATUS status;
 
        if (root_dir_fid == 0 || !smb_fname) {
@@ -5040,7 +5042,7 @@ NTSTATUS create_file_default(connection_struct *conn,
                        status = NT_STATUS_NOT_A_DIRECTORY;
                        goto fail;
                }
-               if (lp_posix_pathnames()) {
+               if (req != NULL && req->posix_pathnames) {
                        ret = SMB_VFS_LSTAT(conn, smb_fname);
                } else {
                        ret = SMB_VFS_STAT(conn, smb_fname);