#include #include #include struct spwd *getspnam(const char * name) { struct spwd *tmp; setspent(); for (;;) { tmp=getspent(); if (!tmp) return 0; if (!strcmp(tmp->sp_namp,name)) return tmp; } }