1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
includefile(include/header)
COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::User)(3bobcat)(_CurYrs_)(libbobcat1-dev__CurVers_-x.tar.gz)
(/etc/passwd user info)
manpagename(FBB::User)(Provides the tt(/etc/passwd) info of the current user)
manpagesynopsis()
bf(#include <bobcat/user>)nl()
Linking option: tt(-lbobcat)
manpagedescription()
This class retrieves the information of the current user from the
information in tt(/etc/passwd). The class is a simple wrapper class around the
bf(getpwent)(3) function.
includefile(include/namespace)
manpagesection(INHERITS FROM)
-
manpagesection(CONSTRUCTORS)
itemization(
itb(User())
The default constructor determines the current user's data.
This constructor throws an tt(Errno) exception if it did not properly
complete because the current user name could not be found in tt(/etc/passwd).
)
The copy and move constructors are available.
manpagesection(OVERLOADED OPERATORS)
The copy and move assignment operators are available.
manpagesection(MEMBER FUNCTIONS)
itemization(
itb(size_t groupid() const)
Returns the user's group-id.
itb(std::string homedir() const)
Returns the user's home directory (including a trailing tt(/)).
itb(std::string name() const)
Returns the user's user-name.
itb(std::string password() const)
Returns the user's encrypted password. But see also the bf(BUGS) \
section.
itb(std::string realname() const)
Returns the user's real name, as listed in the tt(/etc/passwd)'s \
em(gecos) field.
itb(std::string shell() const)
Returns the user's shell.
itb(size_t userid() const)
Returns the user's user-id.
itb(void verify() const)
Obsoleted, will be removed in a future Bobcat release.
)
manpagesection(EXAMPLE)
verbinclude(../../user/driver/driver.cc)
manpagefiles()
em(bobcat/user) - defines the class interface
manpageseealso()
bf(bobcat)(7), bf(getpwent)(3)
manpagebugs()
If the user is a member of multiple groups, only the group id listed in
tt(/etc/passwd) is returned by bf(groupid()).
If shadow passwording is used, the string returned by bf(password()) will
probably not contain the encrypted password.
includefile(include/trailer)
|