diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2006-10-02 05:18:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:21 -0400 |
commit | e9ff3990f08e9a0c2839cc22808b01732ea5b3e4 (patch) | |
tree | c638a7b89f0c5e8adc410316d06ca1de8b8dabee /fs/cifs | |
parent | 0bdd7aab7f0ecd5d337910816aa058c18398628e (diff) |
[PATCH] namespaces: utsname: switch to using uts namespaces
Replace references to system_utsname to the per-process uts namespace
where appropriate. This includes things like uname.
Changes: Per Eric Biederman's comments, use the per-process uts namespace
for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c
[jdike@addtoit.com: UML fix]
[clg@fr.ibm.com: cleanup]
[akpm@osdl.org: build fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/connect.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0e9ba0b9d71e..c78762051da4 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -772,12 +772,12 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol) | |||
772 | separator[1] = 0; | 772 | separator[1] = 0; |
773 | 773 | ||
774 | memset(vol->source_rfc1001_name,0x20,15); | 774 | memset(vol->source_rfc1001_name,0x20,15); |
775 | for(i=0;i < strnlen(system_utsname.nodename,15);i++) { | 775 | for(i=0;i < strnlen(utsname()->nodename,15);i++) { |
776 | /* does not have to be a perfect mapping since the field is | 776 | /* does not have to be a perfect mapping since the field is |
777 | informational, only used for servers that do not support | 777 | informational, only used for servers that do not support |
778 | port 445 and it can be overridden at mount time */ | 778 | port 445 and it can be overridden at mount time */ |
779 | vol->source_rfc1001_name[i] = | 779 | vol->source_rfc1001_name[i] = |
780 | toupper(system_utsname.nodename[i]); | 780 | toupper(utsname()->nodename[i]); |
781 | } | 781 | } |
782 | vol->source_rfc1001_name[15] = 0; | 782 | vol->source_rfc1001_name[15] = 0; |
783 | /* null target name indicates to use *SMBSERVR default called name | 783 | /* null target name indicates to use *SMBSERVR default called name |
@@ -2153,7 +2153,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2153 | 32, nls_codepage); | 2153 | 32, nls_codepage); |
2154 | bcc_ptr += 2 * bytes_returned; | 2154 | bcc_ptr += 2 * bytes_returned; |
2155 | bytes_returned = | 2155 | bytes_returned = |
2156 | cifs_strtoUCS((__le16 *) bcc_ptr, system_utsname.release, | 2156 | cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release, |
2157 | 32, nls_codepage); | 2157 | 32, nls_codepage); |
2158 | bcc_ptr += 2 * bytes_returned; | 2158 | bcc_ptr += 2 * bytes_returned; |
2159 | bcc_ptr += 2; | 2159 | bcc_ptr += 2; |
@@ -2180,8 +2180,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2180 | } | 2180 | } |
2181 | strcpy(bcc_ptr, "Linux version "); | 2181 | strcpy(bcc_ptr, "Linux version "); |
2182 | bcc_ptr += strlen("Linux version "); | 2182 | bcc_ptr += strlen("Linux version "); |
2183 | strcpy(bcc_ptr, system_utsname.release); | 2183 | strcpy(bcc_ptr, utsname()->release); |
2184 | bcc_ptr += strlen(system_utsname.release) + 1; | 2184 | bcc_ptr += strlen(utsname()->release) + 1; |
2185 | strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); | 2185 | strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); |
2186 | bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; | 2186 | bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; |
2187 | } | 2187 | } |
@@ -2445,7 +2445,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2445 | 32, nls_codepage); | 2445 | 32, nls_codepage); |
2446 | bcc_ptr += 2 * bytes_returned; | 2446 | bcc_ptr += 2 * bytes_returned; |
2447 | bytes_returned = | 2447 | bytes_returned = |
2448 | cifs_strtoUCS((__le16 *) bcc_ptr, system_utsname.release, 32, | 2448 | cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release, 32, |
2449 | nls_codepage); | 2449 | nls_codepage); |
2450 | bcc_ptr += 2 * bytes_returned; | 2450 | bcc_ptr += 2 * bytes_returned; |
2451 | bcc_ptr += 2; /* null terminate Linux version */ | 2451 | bcc_ptr += 2; /* null terminate Linux version */ |
@@ -2462,8 +2462,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2462 | } else { /* ASCII */ | 2462 | } else { /* ASCII */ |
2463 | strcpy(bcc_ptr, "Linux version "); | 2463 | strcpy(bcc_ptr, "Linux version "); |
2464 | bcc_ptr += strlen("Linux version "); | 2464 | bcc_ptr += strlen("Linux version "); |
2465 | strcpy(bcc_ptr, system_utsname.release); | 2465 | strcpy(bcc_ptr, utsname()->release); |
2466 | bcc_ptr += strlen(system_utsname.release) + 1; | 2466 | bcc_ptr += strlen(utsname()->release) + 1; |
2467 | strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); | 2467 | strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); |
2468 | bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; | 2468 | bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; |
2469 | bcc_ptr++; /* empty domain field */ | 2469 | bcc_ptr++; /* empty domain field */ |
@@ -2836,7 +2836,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2836 | 32, nls_codepage); | 2836 | 32, nls_codepage); |
2837 | bcc_ptr += 2 * bytes_returned; | 2837 | bcc_ptr += 2 * bytes_returned; |
2838 | bytes_returned = | 2838 | bytes_returned = |
2839 | cifs_strtoUCS((__le16 *) bcc_ptr, system_utsname.release, 32, | 2839 | cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release, 32, |
2840 | nls_codepage); | 2840 | nls_codepage); |
2841 | bcc_ptr += 2 * bytes_returned; | 2841 | bcc_ptr += 2 * bytes_returned; |
2842 | bcc_ptr += 2; /* null term version string */ | 2842 | bcc_ptr += 2; /* null term version string */ |
@@ -2888,8 +2888,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2888 | 2888 | ||
2889 | strcpy(bcc_ptr, "Linux version "); | 2889 | strcpy(bcc_ptr, "Linux version "); |
2890 | bcc_ptr += strlen("Linux version "); | 2890 | bcc_ptr += strlen("Linux version "); |
2891 | strcpy(bcc_ptr, system_utsname.release); | 2891 | strcpy(bcc_ptr, utsname()->release); |
2892 | bcc_ptr += strlen(system_utsname.release) + 1; | 2892 | bcc_ptr += strlen(utsname()->release) + 1; |
2893 | strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); | 2893 | strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); |
2894 | bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; | 2894 | bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; |
2895 | bcc_ptr++; /* null domain */ | 2895 | bcc_ptr++; /* null domain */ |