> Matthieu Herrb hat am 6. Juli 2016 um 07:38 geschrieben:
>
>
> On Tue, Jul 05, 2016 at 11:53:50PM +0200, Nils Reuße wrote:
> > Hi,
> >
> > i'm using slock to lock my screen. However, since i updated to the latest
> > snap, slock won't let me unlock the screen. When started from a terminal,
> > for each failed try it outputs
> >
> > slock: invalid script: /usr/libexec/auth/login_passwd
> >
> > (the password i enter is correct, obviously).
> >
> > Here are the file permissions, slock has sgid set, login_passwd suid:
> >
> > $ ls -l /usr/local/bin/slock
> > -rwxr-sr-x 1 root auth 12432 Jul 2 16:08 /usr/local/bin/slock
> >
> > $ doas ls -l /usr/libexec/auth/login_passwd
> > -r-sr-xr-x 1 root auth 8736 Jul 5 04:33 /usr/libexec/auth/login_passwd
> >
> > /usr/local ist mounted with wxallowed. Any hints?
> >
>
> Check ownership and permissions of '/' '/usr' '/usr/libexec' and
> '/usr/libexec/auth' as well. The error is caused by securepath(3)
> failing.
>
> --
> Matthieu Herrb
Hi Matthieu,
thanks for your mail. Here are the permissions on my system:
$ ls -dl / /usr /usr/libexec /usr/libexec/auth
drwxr-xr-x 19 root wheel 512 Jul 5 19:08 /
drwxr-xr-x 19 root wheel 512 Jul 5 05:18 /usr
drwxr-xr-x 7 root wheel 1024 Jul 5 19:07 /usr/libexec
drwxr-x--- 2 root auth512 Jul 5 04:33 /usr/libexec/auth
Below is a little c program i made for testing, it failed with the same error,
so auth_userokay is really to blame here. After changing permissions to
drwxr-xr-x 2 root auth512 Jul 5 04:33 /usr/libexec/auth
it works. Have my permissions be wrong, or is there another problem hiding?
Nils
--
#include
#include
#include
#include
#include
int
main(int argc, char *argv[])
{
int running = 1;
running = !auth_userokay(getlogin(), NULL, "auth-xlock", NULL);
if (running) {
printf("running is %d, this is a failure\n", running);
} else {
printf("all ok\n");
}
}