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
|
includefile(header.inc)
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(namespace.inc)
manpagesection(INHERITS FROM)
-
manpagesection(CONSTRUCTORS)
itemization(
itb(User() trow(FBB::Errno))
The default constructor determines the current user's data. If
these can't be found, an bf(FBB::Errno) exception is thrown.
itb(User(User const &other) throw())
The standard copy constructor is available.
)
manpagesection(MEMBER FUNCTIONS)
itemization(
itb(size_t groupid() const):nl()
Returns the user's group-id.
itb(size_t homedir() const):nl()
Returns the user's home directory (including a trailing tt(/)).
itb(size_t name() const):nl()
Returns the user's user-name.
itb(size_t password() const):nl()
Returns the user's encrypted password. But see also the bf(BUGS) \
section.
itb(size_t realname() const):nl()
Returns the user's real name, as listed in the tt(/etc/passwd)'s \
em(gecos) field.
itb(size_t shell() const):nl()
Returns the user's shell.
itb(size_t userid() const):nl()
Returns the user's user-id.
)
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(trailer.inc)
|