Document may_change_field().
This commit is contained in:
parent
3d04ff4037
commit
ca468cb988
@ -7,6 +7,7 @@
|
|||||||
* src/chfn.c: Before pam_end(), the return value of the previous
|
* src/chfn.c: Before pam_end(), the return value of the previous
|
||||||
pam API was already checked. No need to validate it again.
|
pam API was already checked. No need to validate it again.
|
||||||
* src/chfn.c: Avoid implicit brackets.
|
* src/chfn.c: Avoid implicit brackets.
|
||||||
|
* src/chfn.c: Document may_change_field().
|
||||||
|
|
||||||
2007-12-31 Nicolas François <nicolas.francois@centraliens.net>
|
2007-12-31 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
11
src/chfn.c
11
src/chfn.c
@ -105,7 +105,16 @@ static void usage (void)
|
|||||||
exit (E_USAGE);
|
exit (E_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* may_change_field - indicate if the user is allowed to change a given field
|
||||||
|
* of her gecos information
|
||||||
|
*
|
||||||
|
* root can change any field.
|
||||||
|
*
|
||||||
|
* field should be one of 'f', 'r', 'w', 'h'
|
||||||
|
*
|
||||||
|
* Return 1 if the user can change the field and 0 otherwise.
|
||||||
|
*/
|
||||||
static int may_change_field (int field)
|
static int may_change_field (int field)
|
||||||
{
|
{
|
||||||
const char *cp;
|
const char *cp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user