From: kay.sievers@vrfy.org Date: Wed, 3 Mar 2004 04:27:12 +0000 (-0800) Subject: [PATCH] bugfix for local user X-Git-Tag: 020~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ec4899acf4338fec32f8f8c218802a406319971;p=systemd [PATCH] 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 :) --- diff --git a/udev-add.c b/udev-add.c index c13cce53..ed0286d1 100644 --- a/udev-add.c +++ b/udev-add.c @@ -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; }