tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

"valid shell"s




To: tech-userlevel%netbsd.org@localhost

Subject: "valid shell"s

From: der Mouse <mouse%Rodents.Montreal.QC.CA@localhost>

Date: Mon, 4 Feb 2008 13:46:07 -0500 (EST)


How can I configure my system so that any path is considered acceptable
by, eg, chsh?

That's actually a rhetorical question.  I know the answer: I can't,
except by hacking on everything that does such tests.  I ask it to
point up that, while it's good for an OS to support that kind of
lockdown, and perhaps even reasonable to default to it, it's
unreasonable to support nothing else.

The real problem, of course, is that the interface - getusershell -
used for the purpose is badly designed; it exposes too much of the
implementation, imposing too much policy.  Instead, it should be
something like usershellisvalid(), taking the proposed shell path; then
its backend(s) could support things like "anything is valid" or
"anything in /usr/local/shells/ is valid" or "anything in a directory
that's root-owned and non-world-writable all the way from / is valid"
as well as "these specific paths are valid".  I'm not entirely alone in
seeing this as a problem; witness /SENDMAIL/ANY/SHELL/.

If I were to design and implement something usershellisvalid()ish
(probably with a compatability getusershell() interface), would there
be any interest in seeing it in the tree?

/~\ The ASCII                           der Mouse
\ / Ribbon Campaign
 X  Against HTML               mouse%rodents.montreal.qc.ca@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



Follow-Ups:

Re: "valid shell"s
From: Christos Zoulas




Prev by Date: Re: larn, and other games

Next by Date: Re: "valid shell"s

Previous by Thread: larn, and other games

Next by Thread: Re: "valid shell"s

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index