linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bugfix for local user
@ 2004-03-02  2:11 Kay Sievers
  2004-03-02  2:59 ` Robert Love
  2004-03-02 20:27 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Kay Sievers @ 2004-03-02  2:11 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

While moving the local user logic in it's own function I missed to
change the "secure" string macro. We copy only the first 3 bytes
of the username. Guess why I didn't notice it :)

thanks,
Kay

[-- Attachment #2: 01-very-short-user-name.patch --]
[-- Type: text/plain, Size: 343 bytes --]

===== udev-add.c 1.56 vs edited =====
--- 1.56/udev-add.c	Tue Mar  2 02:05:20 2004
+++ edited/udev-add.c	Tue Mar  2 03:05:03 2004
@@ -158,7 +158,7 @@
 
 		if (u->ut_time > recent) {
 			recent = u->ut_time;
-			strfieldcpy(user, u->ut_user);
+			strnfieldcpy(user, u->ut_user, OWNER_SIZE);
 			dbg("local user is '%s'", user);
 			break;
 		}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bugfix for local user
  2004-03-02  2:11 [PATCH] bugfix for local user Kay Sievers
@ 2004-03-02  2:59 ` Robert Love
  2004-03-02 20:27 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Love @ 2004-03-02  2:59 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 2004-03-01 at 21:11, Kay Sievers wrote:

> While moving the local user logic in it's own function I missed to
> change the "secure" string macro. We copy only the first 3 bytes
> of the username. Guess why I didn't notice it :)

Or me :)

Good catch.

	Robert Love




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bugfix for local user
  2004-03-02  2:11 [PATCH] bugfix for local user Kay Sievers
  2004-03-02  2:59 ` Robert Love
@ 2004-03-02 20:27 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-03-02 20:27 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Mar 02, 2004 at 03:11:37AM +0100, Kay Sievers wrote:
> While moving the local user logic in it's own function I missed to
> change the "secure" string macro. We copy only the first 3 bytes
> of the username. Guess why I didn't notice it :)

Ah, nice catch.  You can tell I didn't test your patch :)

Hm, any way we can add a test for this to the test framework somehow?

Applied, thanks.

greg k-h


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-02 20:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-02  2:11 [PATCH] bugfix for local user Kay Sievers
2004-03-02  2:59 ` Robert Love
2004-03-02 20:27 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).