Re: Cant unlock the screen with slock

2016-07-07 Thread Stuart Henderson
On 2016/07/07 08:46, Nils Reuße wrote:
> > > -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?

What mount flags do you have on /usr/local?

When you added wxallowed to /usr/local, did you accidentally also add something 
else?



Re: Cant unlock the screen with slock

2016-07-07 Thread Nils Reuße
I just realized i had /usr/local mounted as 'nosuid'.  Same on /home.

Please excuse the noise.

Nils



Re: Cant unlock the screen with slock

2016-07-07 Thread Nils Reuße
> 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");
}
}



Re: Cant unlock the screen with slock

2016-07-05 Thread Matthieu Herrb
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


signature.asc
Description: PGP signature