Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/cifs-utils/files: cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
Date: Mon, 25 Feb 2013 12:07:18
Message-Id: 20130225120715.AD36B2171E@flycatcher.gentoo.org
1 polynomial-c 13/02/25 12:07:15
2
3 Added:
4 cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
5 Log:
6 Mounting with credentials file fixed (bug #459040)
7
8 (Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.1 net-fs/cifs-utils/files/cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/cifs-utils/files/cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/cifs-utils/files/cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch?rev=1.1&content-type=text/plain
15
16 Index: cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
17 ===================================================================
18 From: Jeff Layton <jlayton@×××××.org>
19 Date: Sun, 13 Jan 2013 03:02:01 +0000 (-0500)
20 Subject: mount.cifs: set parsed_info->got_user when a cred file supplies a username
21 X-Git-Url: https://gitweb.samba.org/?p=cifs-utils.git;a=commitdiff_plain;h=1a01f7c4b90695211d12291d7a24bec05b1f2922
22
23 mount.cifs: set parsed_info->got_user when a cred file supplies a username
24
25 commit 85d18a1ed introduced a regression when using a credentials file.
26 It set the username in the parsed mount info properly, but didn't set
27 the "got_user" flag in it.
28
29 Also, fix an incorrect strlcpy length specifier in open_cred_file.
30
31 Reported-by: "Mantas M." <grawity@×××××.com>
32 Signed-off-by: Jeff Layton <jlayton@×××××.org>
33 ---
34
35 diff --git a/mount.cifs.c b/mount.cifs.c
36 index c7c3055..40b77e9 100644
37 --- a/mount.cifs.c
38 +++ b/mount.cifs.c
39 @@ -581,7 +581,8 @@ static int open_cred_file(char *file_name,
40 switch (parse_cred_line(line_buf + i, &temp_val)) {
41 case CRED_USER:
42 strlcpy(parsed_info->username, temp_val,
43 - sizeof(parsed_info->domain));
44 + sizeof(parsed_info->username));
45 + parsed_info->got_user = 1;
46 break;
47 case CRED_PASS:
48 i = set_password(parsed_info, temp_val);