Re: Fix xfe (Was: sudo bad practice or inconsistency?)

2014-10-20 Thread Raimo Niskanen
On Sat, Oct 18, 2014 at 07:29:59AM +0200, Alessandro DE LAURENZIS wrote: > On Fri 17/10 17:39, Raimo Niskanen wrote: > > > > As I read the man page for su it is the target's login shell that is > > invoked, and it need not always be /bin/sh - it can be changed. > > > > Therefore I suspect that yo

Re: Fix xfe (Was: sudo bad practice or inconsistency?)

2014-10-17 Thread Alessandro DE LAURENZIS
On Fri 17/10 17:39, Raimo Niskanen wrote: > > As I read the man page for su it is the target's login shell that is > invoked, and it need not always be /bin/sh - it can be changed. > > Therefore I suspect that you want "-s /bin/sh " between "su " and "root". I'm confused: just22@poseidon:[~]> s

Re: Fix xfe (Was: sudo bad practice or inconsistency?)

2014-10-17 Thread Raimo Niskanen
On Fri, Oct 17, 2014 at 05:51:08AM -0600, David Coppa wrote: > > From: Thorsten Glaser > > Date: Fri, Oct 17, 2014 at 10:44 AM > > Subject: Re: sudo bad practice or inconsistency? > > To: misc@openbsd.org > > > > > > Alessandro DE LAURENZIS gmail.com&

Fix xfe (Was: sudo bad practice or inconsistency?)

2014-10-17 Thread David Coppa
> From: Thorsten Glaser > Date: Fri, Oct 17, 2014 at 10:44 AM > Subject: Re: sudo bad practice or inconsistency? > To: misc@openbsd.org > > > Alessandro DE LAURENZIS gmail.com> writes: > > (line-wrapped because of GMane) > > > #define SUDOCMD "

Re: sudo bad practice or inconsistency?

2014-10-17 Thread Thorsten Glaser
Alessandro DE LAURENZIS gmail.com> writes: (line-wrapped because of GMane) > #define SUDOCMD "-fn 7x14 -geometry 60x4 -e sudo su -c 'nohup \ > xfe >& /dev/null & sleep 1'" ^^ Note that this will not work on OpenBSD anyway; even mksh, which does implement this bashism, will not parse this

Re: sudo bad practice or inconsistency?

2014-10-14 Thread Alessandro DE LAURENZIS
On Tue 14/10 19:08, Miod Vallat wrote: > > just22@poseidon:[xfe]> sudo su -c ls > > su: no such login class: ls > > > > so basically sudo is parsing the "-c" option instead of passing it to > > su. > > No, it is not. If it were, the error message would come from sudo, not > from su. > > > And, i

Re: sudo bad practice or inconsistency?

2014-10-14 Thread Miod Vallat
> just22@poseidon:[xfe]> sudo su -c ls > su: no such login class: ls > > so basically sudo is parsing the "-c" option instead of passing it to > su. No, it is not. If it were, the error message would come from sudo, not from su. > And, in any case, why the same command works in Linux? do they us

Re: sudo bad practice or inconsistency?

2014-10-14 Thread Todd C. Miller
On Tue, 14 Oct 2014 20:58:56 +0200, Alessandro DE LAURENZIS wrote: > Now, launching sudo that way returns an error: > > just22@poseidon:[xfe]> sudo su -c ls > su: no such login class: ls > > so basically sudo is parsing the "-c" option instead of passing it to > su. Probably this is just a bad p

sudo bad practice or inconsistency?

2014-10-14 Thread Alessandro DE LAURENZIS
Dear list, I was playing with xfe (which by the way I consider a great program) and noticed that opening a root window with sudo in OBSD doesn't work. After a bit of debugging, I found out that the root cause is the following definition inside xfedefs.h: #define SUDOCMD "-fn 7x14 -geometry 60x4