26 #if ! defined (octave_oct_passwd_h)
27 #define octave_oct_passwd_h 1
29 #include "octave-config.h"
33 #include <sys/types.h>
46 : m_name (), m_passwd (), m_uid (0), m_gid (0), m_gecos (),
47 m_dir (), m_shell (), m_valid (false)
51 : m_name (pw.m_name), m_passwd (pw.m_passwd),
52 m_uid (pw.m_uid), m_gid (pw.m_gid), m_gecos (pw.m_gecos),
53 m_dir (pw.m_dir), m_shell (pw.m_shell), m_valid (pw.m_valid)
61 m_passwd = pw.m_passwd;
75 std::string name ()
const;
77 std::string passwd ()
const;
83 std::string gecos ()
const;
85 std::string dir ()
const;
87 std::string shell ()
const;
89 bool ok ()
const {
return m_valid; }
91 operator bool ()
const {
return ok (); }
94 static password getpwent (std::string& msg);
96 static password getpwuid (uid_t uid);
97 static password getpwuid (uid_t uid, std::string& msg);
99 static password getpwnam (
const std::string& nm);
100 static password getpwnam (
const std::string& nm, std::string& msg);
102 static int setpwent ();
103 static int setpwent (std::string& msg);
105 static int endpwent ();
106 static int endpwent (std::string& msg);
114 std::string m_passwd;
136 password (
void *p, std::string& msg);
139 OCTAVE_END_NAMESPACE(sys)
140 OCTAVE_END_NAMESPACE(
octave)
password(const password &pw)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn