]> err.no Git - systemd/commitdiff
[PATCH] bugfix for local user
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Wed, 3 Mar 2004 04:27:12 +0000 (20:27 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:35:07 +0000 (21:35 -0700)
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 :)

udev-add.c

index c13cce53d4f413960465d1f53d29b410ab15acba..ed0286d1fc2e9175ab688abb8ab8121e27ed88a6 100644 (file)
@@ -158,7 +158,7 @@ static void set_to_local_user(char *user)
 
                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;
                }