I've run into an issue with slock on a system with both local and remote users. The default config works with the local users because the getpw() function queries password information though NSS and then the shadow system. In the case of remote users, the appropriate information is retrieved from NIS but slock dies when no information is retrieved from the shadow system.
I'm not sure the best way to differentiate between the shadow vs. NIS situation. One guess is that when shadow information is present, the pw_passwd field of the passwd struct will contain 'x', '*', or whatever the system uses as a placeholder in /etc/passwd.
--- slock.c.orig 2012-02-11 04:51:37.000000000 -0500 +++ slock.c 2012-04-06 23:34:23.430768217 -0400 @@ -55,7 +55,7 @@ rval = pw->pw_passwd; #if HAVE_SHADOW_H - { + if (1 >= strlen(rval)) { struct spwd *sp; sp = getspnam(getenv("USER")); if(!sp)
signature.asc
Description: Digital signature