On 7/9/06, <b class="gmail_sendername">Denis Vlasenko</b> &lt;<a href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>&gt; 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>&gt; Hi people,<br>&gt;<br>&gt; I'm using busybox login. When I log in as non-root,<br>&gt; I can use /dev/ttyNN device I am logged on (of course),<br>&gt; but cannot use /dev/vcs[a]NN devices which hold screen
<br>&gt; buffer data. I need to be able to do it.<br>&gt; util-linux's login chown+chmod's those devices for me.<br>&gt;<br>&gt; 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 &quot;$ttyname&quot; | sed 's/[0-9]*$//'`
<br>ttytail=${ttyname:${#ttybase}}<br>if test &quot;$ttybase&quot; = &quot;/dev/tty&quot;; then<br>&nbsp;&nbsp;&nbsp;&nbsp;chown &quot;$LOGIN_USER&quot;: &quot;/dev/vcs$ttytail&quot; &quot;/dev/vcsa$ttytail&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;chmod 0600 &quot;/dev/vcs$ttytail&quot; &quot;/dev/vcsa$ttytail&quot;
<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.&nbsp; 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>