23 #if !defined (octave_oct_passwd_h)
24 #define octave_oct_passwd_h 1
28 #include <sys/types.h>
37 : pw_name (), pw_passwd (), pw_uid (0), pw_gid (0), pw_gecos (),
38 pw_dir (), pw_shell (), valid (false)
42 : pw_name (pw.pw_name), pw_passwd (pw.pw_passwd),
43 pw_uid (pw.pw_uid), pw_gid (pw.pw_gid), pw_gecos (pw.pw_gecos),
44 pw_dir (pw.pw_dir), pw_shell (pw.pw_shell), valid (pw.valid)
66 std::string name (
void)
const;
68 std::string passwd (
void)
const;
70 uid_t uid (
void)
const;
72 gid_t gid (
void)
const;
74 std::string gecos (
void)
const;
76 std::string dir (
void)
const;
78 std::string shell (
void)
const;
80 bool ok (
void)
const {
return valid; }
82 operator bool ()
const {
return ok (); }
91 static octave_passwd getpwnam (
const std::string& nm, std::string& msg);
93 static int setpwent (
void);
94 static int setpwent (std::string& msg);
96 static int endpwent (
void);
97 static int endpwent (std::string& msg);
129 void gripe_invalid (
void)
const;
octave_passwd(const octave_passwd &pw)