<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaemonForums - Programming</title>
		<link>http://www.daemonforums.org//</link>
		<description>C, bash, Python, Perl, PHP, Java, you name it.</description>
		<language>en</language>
		<lastBuildDate>Wed, 19 Jun 2013 11:43:49 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daemonforums.org/images/misc/rss.jpg</url>
			<title>DaemonForums - Programming</title>
			<link>http://www.daemonforums.org//</link>
		</image>
		<item>
			<title>need help with my own rlogind.c</title>
			<link>http://www.daemonforums.org//showthread.php?t=7941&amp;goto=newpost</link>
			<pubDate>Fri, 07 Jun 2013 13:52:13 GMT</pubDate>
			<description><![CDATA[Hi 
I have a few quesitons regarding a version of rlogind.c that i'm hacking on. I*'m not crazy enough to think that anyone will use it or distribute...]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
I have a few quesitons regarding a version of rlogind.c that i'm hacking on. I<b>'m not crazy enough to think that anyone will use it or distribute it, i'm just doing it as a programming exercise.</b> I use a variation of rlogin.c, for the client, from the one in the original w.rich stevens network prog book.<br />
The server program has a function to multiplex between the network and master-side of the pseudo terminal.This is after a function has been called which opens the master and slave of the pseudo terminal and <b>exec()s</b> <b>/bin/login</b> like so:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">if(excel(&quot;/bin/login&quot;, &quot;login&quot;, &quot;-p&quot;, &quot;-h&quot;, hp-&gt;h_name, &quot;-f&quot;, user_name, (char *)0)== -1)<br />
&nbsp;  perror(&quot;/bin/login error&quot;);</code><hr />
</div>Before the <b>exec()</b> of <b>/bin/login</b> the slave side is opened after a <b>fork()</b> and a <b>setsid()</b> to put what ever is exec()'d after this <b>fork()</b> in it's own session. Then the slave-side becomes the CTTY of anything executed in this child. Also <b>dup2</b> is then called to set the stdin, stout, stderr to the slave's file descriptor(returned from open()ing the slave-side, as explained above). Thus, i thought, <b>/bin/login</b> would have it's stdin, stout and std err connected to the slave-side of the pseudo term(?). Is this wrong? What would stop this being the case? What would stop the output from <b>/bin/login</b> from ending up at the master-side of the tty and thus be output on the socket(to be sent to the client)? Or is it most likely to be the multiplexing of socket/master-side I/O that is wrong? Here is the code that does this multiplexing(of socket and master-side I/O....a tiny bit of it is from the BSD version of rlogind.c):<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&nbsp; &nbsp; &nbsp; &nbsp; /*<br />
&nbsp;* Copyright (c) 1983 The Regents of the University of California.<br />
&nbsp;* All rights reserved.<br />
&nbsp;*<br />
&nbsp;* Redistribution and use in source and binary forms are permitted<br />
&nbsp;* provided that the above copyright notice and this paragraph are<br />
&nbsp;* duplicated in all such forms and that any documentation,<br />
&nbsp;* advertising materials, and other materials related to such<br />
&nbsp;* distribution and use acknowledge that the software was developed<br />
&nbsp;* by the University of California, Berkeley.&nbsp; The name of the<br />
&nbsp;* University may not be used to endorse or promote products derived<br />
&nbsp;* from this software without specific prior written permission.<br />
&nbsp;* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR<br />
&nbsp;* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED<br />
&nbsp;* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.<br />
&nbsp;*/<br />
&nbsp; &nbsp; &nbsp; &nbsp; max_pfd = max(p_ptr.connfd, p_ptr.fdm);<br />
&nbsp; &nbsp; &nbsp; &nbsp; FD_ZERO(&amp;errorset);<br />
&nbsp; &nbsp; &nbsp; &nbsp; FD_SET(p_ptr.fdm, &amp;errorset);<br />
&nbsp; &nbsp; &nbsp; &nbsp; FD_ZERO(&amp;p_error);<br />
&nbsp; &nbsp; &nbsp; &nbsp; FD_SET(p_ptr.fdm, &amp;p_error);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if ((child = fork()) &lt; 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; perror(&quot;fork error&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else if (child == 0) {&nbsp; &nbsp; &nbsp; &nbsp; /* child copies stdin to ptym */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for ( ; ; ) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  errset = errorset;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  select(maxfd + 1, NULL, NULL, &amp;errset, NULL);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(FD_ISSET(p_ptr.fdm, &amp;errset)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cc = read(p_ptr.fdm, &amp;cntlbyte, 1);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(cc == 1 &amp;&amp; pkcontrol(cntlbyte)){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cntlbyte |= oobdata[0];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  send(p_ptr.connfd, &amp;cntlbyte, 1, MSG_OOB);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(cntlbyte &amp; TIOCPKT_FLUSHWRITE) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  memset(buf, 0, sizeof(buf));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((nread = read(p_ptr.connfd, buf, BUFFSIZE)) &lt; 0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; perror(&quot;read error from socket&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (nread == 0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(ptr = buf; ptr &lt; buf+nread-1; ptr++) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(ptr[0] == magic[0] &amp;&amp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ptr[1] == magic[1]) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  left = nread - (ptr - buf);&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  n = control(p_ptr.fdm, ptr, left);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if(n) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; left -= n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(left &gt; 0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bcopy(ptr+n, ptr, left);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nread -= n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (writen(p_ptr.fdm, buf, nread) != nread)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; perror(&quot;writen error to master pty&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }/*End of for? */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  * We always terminate when we encounter an EOF on stdin,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  * but we notify the parent only if ignoreeof is 0.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (p_ptr.ignoreeof == 0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kill(getppid(), SIGTERM);&nbsp; &nbsp; &nbsp; &nbsp; /* notify parent */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit(0);&nbsp; &nbsp; &nbsp; &nbsp; /* and terminate; child can't return */<br />
<br />
&nbsp; &nbsp; &nbsp;  }/*end of child */<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; /*<br />
&nbsp; &nbsp; &nbsp; &nbsp;  * Parent copies ptym to stdout.<br />
&nbsp; &nbsp; &nbsp; &nbsp;  */<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (signal(SIGTERM, sig_term) == SIG_ERR)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; perror(&quot;signal_intr error for SIGTERM&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for ( ; ; ) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_err = p_error;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*p_wset = p_write;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_rset = p_read;*/<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select(max_pfd + 1, NULL, NULL, &amp;p_err, NULL);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(FD_ISSET(p_ptr.fdm, &amp;p_err)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  cc = read(p_ptr.fdm, &amp;cntlbyte, 1);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if(cc == 1 &amp;&amp; pkcontrol(cntlbyte)){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  cntlbyte |= oobdata[0];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  send(p_ptr.fdm, &amp;cntlbyte, 1, MSG_OOB);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if(cntlbyte &amp; TIOCPKT_FLUSHWRITE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; memset(buf, 0, sizeof(buf));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((nread = read(p_ptr.fdm, buffer, BUFFSIZE)) &lt;= 0){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; perror(&quot;Read error on pty master&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; /* signal caught, error, or EOF */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*if(buffer[0] == 0) {*/<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(pkcontrol(buffer[0])) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  buffer[0] |= oobdata[0];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  send(p_ptr.connfd, &amp;buffer[0], 1, MSG_OOB);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }else {&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (writen(p_ptr.connfd, buffer, nread) != nread)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; perror(&quot;writen error to stdout&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }/*else*/<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } /*Closes for? */&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; /*<br />
&nbsp; &nbsp; &nbsp; &nbsp;  * There are three ways to get here: sig_term() below caught the<br />
&nbsp; &nbsp; &nbsp; &nbsp;  * SIGTERM from the child, we read an EOF on the pty master (which<br />
&nbsp; &nbsp; &nbsp; &nbsp;  * means we have to signal the child to stop), or an error.<br />
&nbsp; &nbsp; &nbsp; &nbsp;  */<br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; if (sigcaught == 0)&nbsp; &nbsp; &nbsp; &nbsp; /* tell child if it didn't send us the signal */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kill(child, SIGTERM);<br />
&nbsp; &nbsp; &nbsp; &nbsp; /*<br />
&nbsp; &nbsp; &nbsp; &nbsp;  * Parent returns to caller.<br />
&nbsp; &nbsp; &nbsp; &nbsp;  */<br />
&nbsp;  /* Need to close connection and do any clean up here<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; */<br />
&nbsp;  <br />
&nbsp;  close(p_ptr.connfd);<br />
&nbsp;  }<br />
&nbsp;  return(0);<br />
&nbsp; <br />
}</code><hr />
</div> I've looked at <b>/etc/login.access</b> i even removed the user i was trying to log in as from wheel! I was hoping that with the pseudo term and network set up(the network functions are executing without (p)errors) that <b>/bin/login </b>would just execute the login shell in the same environment( as you can see i used the &quot;-p&quot; flag to /bin/login! Then when <b>/bin/login exec()'d</b> <b>/usr/local/bin/bash</b> that the code above would pass the output from bash to the slave-side, which would appear at the master-side(since the slave is in raw-mode). As the slave was put in raw-mode anything output to it would appear as output for the socket and visa-versa(Although the master-side in the server isn't set to raw). Is that the right way to do it? When i run the server on FreeBSD no errors are output. When the client is run on os x there is a read error on the client function called <b>reader()</b>(from the rlogin client in rich stevens' net prog book).<br />
So do i have to edit /etc/ttys and put &quot;secure&quot; for evert ttyXY? I ran <b>tcpdump</b> and the only packets exchanged were the client sending the user name and the server successfully reading this and sending back an &quot;o.k&quot;. What are the &quot;gotchas&quot; for /bin/login and pseudo terms talking to the network? Why might the login fail? I've tried exec()ing /bin/login with and without the &quot;-f&quot; flag. When i did use the &quot;-f&quot; flag i tried logging in as the user who was already logged in and with a user who was not already logged in! I don't know why i can't get this to work(?)<br />
I can post the whole code of the server and/or the client if necessary. But that is kinda crazy(as is wanting to code such an application as rlogind!)<br />
Any help/suggestions would be gratefully received<br />
Thank you very much in advance.</div>

]]></content:encoded>
			<category domain="http://www.daemonforums.org//forumdisplay.php?f=28">Programming</category>
			<dc:creator>unixjingleman</dc:creator>
			<guid isPermaLink="true">http://www.daemonforums.org//showthread.php?t=7941</guid>
		</item>
	</channel>
</rss>
