|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T p
Length: 914 (0x392)
Types: TextFile
Names: »pp_setuserid.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z«
└─⟦e5a54fb17⟧
└─⟦this⟧ »pp-5.0/Lib/tai/pp_setuserid.c«
/* pp_setuserid.c: set user id to pp owner */
# ifndef lint
static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/tai/RCS/pp_setuserid.c,v 5.0 90/09/20 16:16:30 pp Exp Locker: pp $";
# endif
/*
* $Header: /cs/research/pp/hubris/pp-beta/Lib/tai/RCS/pp_setuserid.c,v 5.0 90/09/20 16:16:30 pp Exp Locker: pp $
*
* $Log: pp_setuserid.c,v $
* Revision 5.0 90/09/20 16:16:30 pp
* rcsforce : 5.0 public release
*
*/
#include "util.h"
#include <pwd.h>
extern char *pplogin;
/* --------------------- Begin Routines -------------------------------- */
int pp_setuserid()
{
struct passwd *pwd;
if ((pwd = getpwnam(pplogin)) == (struct passwd *)0)
return (NOTOK);
if (setuid (pwd->pw_uid) == NOTOK) {
PP_LOG (LLOG_EXCEPTIONS,
("Lib/pp_setuserid.c/Can't set uid to %d(%s)",
pwd -> pw_uid, pplogin));
return (NOTOK);
}
return (OK);
}