On 7/9/06, <b class="gmail_sendername">Denis Vlasenko</b> <<a href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Saturday 08 July 2006 22:04, Denis Vlasenko wrote:<br>> Hi people,<br>><br>> I'm using busybox login. When I log in as non-root,<br>> I can use /dev/ttyNN device I am logged on (of course),<br>> but cannot use /dev/vcs[a]NN devices which hold screen
<br>> buffer data. I need to be able to do it.<br>> util-linux's login chown+chmod's those devices for me.<br>><br>> Is there any solution for busybox login?<br><br>Okay, maybe this patch will be deemed insufficiently ugly
<br>to reject. (/me crosses fingers...)<br><br>With this patch I can point LOGIN_PRE_SUID_SCRIPT to<br>the script like this:<br><br>#!/bin/sh<br>ttyname=`ttyname`<br>ttybase=`echo "$ttyname" | sed 's/[0-9]*$//'`
<br>ttytail=${ttyname:${#ttybase}}<br>if test "$ttybase" = "/dev/tty"; then<br> chown "$LOGIN_USER": "/dev/vcs$ttytail" "/dev/vcsa$ttytail"<br> chmod 0600 "/dev/vcs$ttytail" "/dev/vcsa$ttytail"
<br>fi<br><br>This will achieve what I want, and is generic enough<br>when compared to adding /dev/vcs[a] support into the login itself.<br>--<br>vda</blockquote><div><br>I'm a bit confused, and not near the code right now. Is this something that happens before you would have a chance to call something like a .profile for the user to fix this up?
<br></div><br></div><br>