summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorJeff Layton2010-11-22 21:31:03 +0100
committerSteve French2010-12-06 23:45:19 +0100
commit884639996814585ef7079daa9e03a1eb562e235c (patch)
tree652d60d1716be67db2c21aaeaf643dc00d65e392 /fs/cifs/connect.c
parentcifs: fix use of CONFIG_CIFS_ACL (diff)
downloadkernel-qcow2-linux-884639996814585ef7079daa9e03a1eb562e235c.tar.gz
kernel-qcow2-linux-884639996814585ef7079daa9e03a1eb562e235c.tar.xz
kernel-qcow2-linux-884639996814585ef7079daa9e03a1eb562e235c.zip
cifs: remove Local_System_Name
...this string is zeroed out and nothing ever changes it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index bb17ee2ba782..53f9c31a52b2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -807,23 +807,20 @@ cifs_parse_mount_options(char *options, const char *devname,
short int override_gid = -1;
bool uid_specified = false;
bool gid_specified = false;
+ char *nodename = utsname()->nodename;
separator[0] = ',';
separator[1] = 0;
- if (Local_System_Name[0] != 0)
- memcpy(vol->source_rfc1001_name, Local_System_Name, 15);
- else {
- char *nodename = utsname()->nodename;
- int n = strnlen(nodename, 15);
- memset(vol->source_rfc1001_name, 0x20, 15);
- for (i = 0; i < n; i++) {
- /* does not have to be perfect mapping since field is
- informational, only used for servers that do not support
- port 445 and it can be overridden at mount time */
- vol->source_rfc1001_name[i] = toupper(nodename[i]);
- }
- }
+ /*
+ * does not have to be perfect mapping since field is
+ * informational, only used for servers that do not support
+ * port 445 and it can be overridden at mount time
+ */
+ memset(vol->source_rfc1001_name, 0x20, 15);
+ for (i = 0; i < strnlen(nodename, 15); i++)
+ vol->source_rfc1001_name[i] = toupper(nodename[i]);
+
vol->source_rfc1001_name[15] = 0;
/* null target name indicates to use *SMBSERVR default called name
if we end up sending RFC1001 session initialize */