From ca468cb988f610267f4458c58977adcc7216ebf9 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 31 Dec 2007 14:03:14 +0000 Subject: [PATCH] Document may_change_field(). --- ChangeLog | 1 + src/chfn.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ccfe0f97..cd6dcb19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ * src/chfn.c: Before pam_end(), the return value of the previous pam API was already checked. No need to validate it again. * src/chfn.c: Avoid implicit brackets. + * src/chfn.c: Document may_change_field(). 2007-12-31 Nicolas François diff --git a/src/chfn.c b/src/chfn.c index 1456dd1c..6380c217 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -105,7 +105,16 @@ static void usage (void) 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) { const char *cp;