Heyho Quentin,

thanks for the update.

Quentin Rameau wrote:
> diff --git a/config.mk b/config.mk
> …
> -# Install mode. On BSD systems MODE=2755 and GROUP=auth
> -# On others MODE=4755 and GROUP=root
> -#MODE=2755
> -#GROUP=auth

There was a patch some time ago making use of those variables. If the file
permissions and owner/group have to be different on BSD, this should be kept
(but actually updated in the Makefile to be used), since config.mk is the place
for system dependent adaptions of the build, not Makefile. If they are the same
on the BSDs, this block can be removed of course.

> diff --git a/slock.c b/slock.c
> …
> +#else
> +     if (rval[0] == '*' && rval[1] == '\0') {
> +#ifdef __OpenBSD__
> +             if (!(pw = getpwnam_shadow(getenv("USER"))))
> +                     die("cannot retrieve shadow entry (make sure to suid or 
> sgid slock)\n");
> +             rval = pw->pw_passwd;
> +#else
> +             die("cannot retrieve shadow entry (make sure to suid or sgid 
> slock)\n");
> +#endif /* __OpenBSD__ */
> +     }
> +#endif /* HAVE_SHADOW_H */

We should probably use another error message in the not __OpenBSD__ case, maybe
something like "slock: unknown shadow passwd system\n". Also please add the
"slock: " prefix to the other die() call.

--Markus

Reply via email to