username.h
Go to the documentation of this file.
/*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef USERNAME_H
#define USERNAME_H
#define USERNAME_MAX 256
int username_is_super();
int username_get(char *name);
int username_set(const char *name);
int username_home(char *dir);
#endif
username_get
int username_get(char *name)
Get the name of the current user.
username_home
int username_home(char *dir)
Get the current user's home directory.
username_set
int username_set(const char *name)
Switch to the named user.
username_is_super
int username_is_super()
Determine if the current user is the super user.