[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SU for group admin
Totally out of line but I'm desperate:
I wrote a server for Linux some time ago and now I ported (am porting) it
to SUN4. It's plain old ANSI C, compiled with gcc. Now I have a problem:
The SUN manuals don't say what the prototype of the address must be for
bind to work with inet streams. I suppose it's sockaddr_in but nowhere in
include/sys/socket.h is that described.
So I use this line:
if( bind(s, (struct sockaddr*)&(sa), (int)sizeof(sa) ) < 0)) /* scream...
sa is a sockaddr_in and initialized (port and other stuff) and works
directly under Linux. Here (SUN4) it compiles without complaint and then
does a SIGSEGV on run. The weird thing is that I got this working at least
twice on this machine today and I don't know why it does not work anymore
?! Because I logged in with telnet into my own server to test and it
worked !
anyone ?!
On Tue, 1 Jul 1997, Ira Abramov wrote:
> On Tue, 1 Jul 1997, Peter Lorand Peres wrote:
>
> > You must write a C program or a set of scripts (less secure) that
> > manipulate the /etc/groups file in an atomic way and that runs as (suid)
>
> exactly. a set of atomic scripts may blow up in your face...
>
> seriously, it's very tricky to get this right and safe AFAIK, I wouldn't
> even dive into it if I could avoid it.
>
> ------------------------------------------------------
> Ira Abramov <ira@interHDL.com>
> Webmaster @ interHDL Inc. - The HDL Technology Company
> Tel: (415) 428-4200 4984 El Camino Real #210
> Fax: (415) 428-4201 Los Altos CA, 94022-1433
>
>
>
>
Peter Lorand Peres
------------------
plp@actcom.co.il 100310.2360@compuserve.com
http://ourworld.compuserve.com/homepages/plp
Follow-Ups:
References: