Skip to contentSkip to conversation

bugfix for local user

PATCH Applied Kay Sievers 3 participants 3 messages Mar 2, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bugfix for local user

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

===== udev-add.c 1.56 vs edited =====

udev-add.c +1 -1
@@ -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;
 		}
#1 lore raw
Quoted 3 lines · Kay Sievers

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_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

Applied
#2 lore raw
In reply to Kay Sievers
Quoted 3 lines · Kay Sievers

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_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel