2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * Portable standins for getuid() and friends.
13 typedef WvString wvuid_t
;
14 #define WVUID_INVALID (WvString::null)
17 typedef uid_t wvuid_t
;
18 #define WVUID_INVALID ((wvuid_t)(-1))
22 * Convert a uid object into a human-readable username.
23 * Returns WvString::null if the uid isn't findable or doesn't exist.
25 WvString
wv_username_from_uid(wvuid_t uid
);
28 * Convert a human-readable username into a machine-usable uid.
29 * Returns WVUID_INVALID if the username isn't findable or doesn't exist.
31 wvuid_t
wv_uid_from_username(WvString username
);
34 * Return the machine-usable uid corresponding to the current session user.
36 * Corresponds to getuid() in Unix; parallels for functions
37 * like getgid() and geteuid() are not currently available.
39 * In Unix, this should never fail. In Windows, there is no guarantee that
40 * it will work. It returns WVUID_INVALID on failure.