From: TTU::JLS2013 "Joel L. Seber ... CH210" 15-OCT-1992 13:27:47.52
To: SUN-MANAGERS
CC: JLS2013
Subj: need help with 'execl(3)V)
Running SUNOS 4.1.1b on Sparcstations 1, 1+, 2, IPC, all networked, NIS.
I need some assistance with the 'execl(3V)' command. I am attempting to
write a front-end for 'rlogin' and 'rsh' to restrict their usage to our
local net (I know about group access, but this is an entirely different
problem). The front-end is in C, and my parameter parser works fine.
My problem is when I try to call /usr/ucb/rlogin (haven't gotten to rsh yet)
with 'execl'. My call looks like this:
if ( ok == 'y' )
{
*++argv; /* to remove my program name */
execl("/usr/ucb/rlogin", argv);
}
as specified in the man page. If I send one parameter as in
% myrlogin machinea
everything works fine. If I send any more than one parameter, as in
% myrlogin -8 machinea
I get the usage message from 'rlogin' as if I had sent a wrong parameter.
I have even tried this with the straight 'exec' call and sending exactly the
parameters in the second example and terminating with a null ( (char *)0 ).
That also failed exactly as above.
I even print the parameters I send before sending to make sure that they are
correct.
Any clues? I am at my wit's end on this one.
Please send any replies to me directly and I will summarize.
Thanks much,
Joel L. Seber | Dry humor is wasted around here.
SUN Workstation Laboratory Manager |
Center for Manufacturing Research | -Joel L. Seber
and Technology Utilization |
Tennessee Technological University | recursive, adj.
Cookeville, TN 38505 | See 'recursive'
|
jls2013@tntech.edu |
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:52 CDT