Re: crash on reconfig
Dmitry Perfilyev <[email protected]> Fri, 26 Dec 2003 10:54:14 +0300
| Newsgroups | gmane.network.xinetd |
|---|---|
| Organization | JSC Combellga |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------6C98762E4FFD8D09873F1898
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit
see attach.
> >my xinetd installation (based on 2.3.12) includes 2 patches:
> >* understand numeric group - like '#65534' instead 'nogroup'
> > ( because Solaris sometime fails on getgrnam() )
>
> I'd be interested in seeing this one. Sounds simple & low risk.
> My aim at this point is simply stabilizing xinetd. As far as I
> know, that is done. :)
>
> -Steve Grubb
--
Dmitry Perfilyev
--------------6C98762E4FFD8D09873F1898
Content-Type: text/plain; charset=koi8-r;
name="num_group.patch"
Content-Disposition: inline;
filename="num_group.patch"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mailhub.co.ru id hBQ7sEHe017030
*** parsers.c.orig =F0=CE =F3=C5=CE 8 15:41:17 2003
--- parsers.c =F0=CE =F3=C5=CE 15 16:36:20 2003
***************
*** 300,313 ****
struct group *grp ;
const char *func =3D "group_parser" ;
=20
! grp =3D getgrnam( group_ptr ) ;
! if ( grp =3D=3D NULL )
{
! parsemsg( LOG_ERR, func, "Unknown group: %s", group_ptr ) ;
! return( FAILED ) ;
}
=20
- scp->sc_gid =3D grp->gr_gid ;
return( OK ) ;
}
=20
--- 300,324 ----
struct group *grp ;
const char *func =3D "group_parser" ;
=20
! if ( group_ptr[0] =3D=3D '#' )
{
! if ( (scp->sc_gid =3D (gid_t) atoi( group_ptr + 1 )) <=3D 0 )
! {
! parsemsg( LOG_ERR, func, "Unknown numeric group: %s", group_pt=
r ) ;
! return( FAILED ) ;
! }
}
+ else
+ {
+ grp =3D getgrnam( group_ptr ) ;
+ if ( grp =3D=3D NULL )
+ {
+ parsemsg( LOG_ERR, func, "Unknown group: %s", group_ptr ) ;
+ return( FAILED ) ;
+ }
+ scp->sc_gid =3D grp->gr_gid ;
+ }=20
=20
return( OK ) ;
}
=20
--------------6C98762E4FFD8D09873F1898--