Hi,
> I would be willing to apply the slock.c patch, if you can supply diff
> -u or hg diff output accordingly.
thanks, patch is attached.
Kind Regards,
Michael
--- slock.c.orig 2012-01-24 10:57:52.751270668 +0100
+++ slock.c 2012-01-24 10:59:00.616019472 +0100
@@ -38,9 +38,9 @@
const char *rval;
struct passwd *pw;
- if(geteuid() != 0)
- die("slock: cannot retrieve password entry (make sure to suid slock)\n");
pw = getpwuid(getuid());
+ if(!pw)
+ die("slock: cannot retrieve password entry (may you need to suid or sgid slock?)\n");
endpwent();
rval = pw->pw_passwd;
@@ -48,6 +48,8 @@
{
struct spwd *sp;
sp = getspnam(getenv("USER"));
+ if(!sp)
+ die("slock: cannot retrieve shadow entry (may you need to suid or sgid slock?)\n");
endspent();
rval = sp->sp_pwdp;
}