00001 // This is core/vul/vul_user_info.h 00002 #ifndef vul_user_info_h_ 00003 #define vul_user_info_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // \brief Reads information about a user from the password file. 00010 // \author Andrew W. Fitzgibbon, Oxford RRG 00011 // \date 08 Apr 1999 00012 // 00013 // \verbatim 00014 // Modifications 00015 // 990408 AWF Initial version. 00016 // 010321 C. Beeston documentation changes 00017 // \endverbatim 00018 //----------------------------------------------------------------------------- 00019 00020 #include <vcl_string.h> 00021 00022 //: Reads information about a user from the password file 00023 class vul_user_info 00024 { 00025 public: 00026 typedef unsigned long uid_type; 00027 00028 bool ok; 00029 uid_type uid; 00030 uid_type gid; 00031 vcl_string name; // login name 00032 vcl_string home_directory; 00033 vcl_string full_name; 00034 vcl_string shell; 00035 vcl_string passwd; 00036 00037 // Constructors/Destructors-------------------------------------------------- 00038 00039 //: Lookup info from numeric user-id 00040 vul_user_info(uid_type u_id) { init(u_id); } 00041 //: Lookup info from login name 00042 vul_user_info(char const* nam) { init(nam); } 00043 //: Lookup info from login name 00044 vul_user_info(vcl_string const& nam) { init(nam.c_str()); } 00045 //: NYI 00046 void init(uid_type); 00047 //: initialise vul_user_info for given login name 00048 void init(char const* nam); 00049 }; 00050 00051 #endif // vul_user_info_h_