public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [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
@ 2013-02-25 12:07 Lars Wendler (polynomial-c)
  0 siblings, 0 replies; only message in thread
From: Lars Wendler (polynomial-c) @ 2013-02-25 12:07 UTC (permalink / raw
  To: gentoo-commits

polynomial-c    13/02/25 12:07:15

  Added:               
                        cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
  Log:
  Mounting with credentials file fixed (bug #459040)
  
  (Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

Revision  Changes    Path
1.1                  net-fs/cifs-utils/files/cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch

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
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

Index: cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
===================================================================
From: Jeff Layton <jlayton@samba.org>
Date: Sun, 13 Jan 2013 03:02:01 +0000 (-0500)
Subject: mount.cifs: set parsed_info->got_user when a cred file supplies a username
X-Git-Url: https://gitweb.samba.org/?p=cifs-utils.git;a=commitdiff_plain;h=1a01f7c4b90695211d12291d7a24bec05b1f2922

mount.cifs: set parsed_info->got_user when a cred file supplies a username

commit 85d18a1ed introduced a regression when using a credentials file.
It set the username in the parsed mount info properly, but didn't set
the "got_user" flag in it.

Also, fix an incorrect strlcpy length specifier in open_cred_file.

Reported-by: "Mantas M." <grawity@gmail.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
---

diff --git a/mount.cifs.c b/mount.cifs.c
index c7c3055..40b77e9 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -581,7 +581,8 @@ static int open_cred_file(char *file_name,
 		switch (parse_cred_line(line_buf + i, &temp_val)) {
 		case CRED_USER:
 			strlcpy(parsed_info->username, temp_val,
-				sizeof(parsed_info->domain));
+				sizeof(parsed_info->username));
+			parsed_info->got_user = 1;
 			break;
 		case CRED_PASS:
 			i = set_password(parsed_info, temp_val);





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-25 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 12:07 [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 Lars Wendler (polynomial-c)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox