1: #include <stdio.h> 2: #include "PasswordLookup.h" 3: 4: extern Passwd *getpwnam(), *getpwuid(); 5: 6: Passwd empty = { "", "", 0, 0, 0, "", "" }; 7: 8: Passwd 9: LookupUser(user) 10: String user; 11: { 12: Passwd *pw; 13: 14: pw = getpwnam(user); 15: if (pw == 0) 16: return (empty); 17: else 18: return (*pw); 19: } 20: 21: Passwd 22: LookupUid(uid) 23: Cardinal uid; 24: { 25: Passwd *pw; 26: 27: pw = getpwuid(uid); 28: if (pw == 0) 29: return (empty); 30: else 31: return (*pw); 32: }