fix spelling and unify whitespace
This commit is contained in:
@@ -68,7 +68,7 @@ void audit_help_open (void)
|
||||
* This function will log a message to the audit system using a predefined
|
||||
* message format. Parameter usage is as follows:
|
||||
*
|
||||
* type - type of message: AUDIT_USER_CHAUTHTOK for changing any account
|
||||
* type - type of message: AUDIT_USER_CHAUTHTOK for changing any account
|
||||
* attributes.
|
||||
* pgname - program's name
|
||||
* op - operation. "adding user", "changing finger info", "deleting group"
|
||||
|
||||
@@ -117,7 +117,7 @@ static void error_acl (struct error_context *ctx, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
/* ignore the case when destination does not support ACLs
|
||||
/* ignore the case when destination does not support ACLs
|
||||
* or extended attributes */
|
||||
if (ENOTSUP == errno) {
|
||||
errno = 0;
|
||||
|
||||
@@ -157,7 +157,7 @@ static int check_gid (const gid_t gid,
|
||||
* [GID_MIN:GID_MAX] range.
|
||||
* This ID should be higher than all the used GID, but if not possible,
|
||||
* the lowest unused ID in the range will be returned.
|
||||
*
|
||||
*
|
||||
* Return 0 on success, -1 if no unused GIDs are available.
|
||||
*/
|
||||
int find_new_gid (bool sys_group,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
*
|
||||
* If successful, find_new_sub_gids provides a range of unused
|
||||
* user IDs in the [SUB_GID_MIN:SUB_GID_MAX] range.
|
||||
*
|
||||
*
|
||||
* Return 0 on success, -1 if no unused GIDs are available.
|
||||
*/
|
||||
int find_new_sub_gids (gid_t *range_start, unsigned long *range_count)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
*
|
||||
* If successful, find_new_sub_uids provides a range of unused
|
||||
* user IDs in the [SUB_UID_MIN:SUB_UID_MAX] range.
|
||||
*
|
||||
*
|
||||
* Return 0 on success, -1 if no unused UIDs are available.
|
||||
*/
|
||||
int find_new_sub_uids (uid_t *range_start, unsigned long *range_count)
|
||||
|
||||
@@ -157,7 +157,7 @@ static int check_uid(const uid_t uid,
|
||||
* [UID_MIN:UID_MAX] range.
|
||||
* This ID should be higher than all the used UID, but if not possible,
|
||||
* the lowest unused ID in the range will be returned.
|
||||
*
|
||||
*
|
||||
* Return 0 on success, -1 if no unused UIDs are available.
|
||||
*/
|
||||
int find_new_uid(bool sys_user,
|
||||
|
||||
@@ -209,7 +209,7 @@ void write_mapping(int proc_dir_fd, int ranges, struct map_range *mappings,
|
||||
}
|
||||
#endif
|
||||
|
||||
bufsize = ranges * ((ULONG_DIGITS + 1) * 3);
|
||||
bufsize = ranges * ((ULONG_DIGITS + 1) * 3);
|
||||
pos = buf = xmalloc(bufsize);
|
||||
|
||||
/* Build the mapping command */
|
||||
|
||||
@@ -404,7 +404,7 @@ static bool user_in_group (const char *uname, const char *gname)
|
||||
{
|
||||
struct group *groupdata;
|
||||
|
||||
if (uname == NULL || gname == NULL){
|
||||
if (uname == NULL || gname == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <lastlog.h>
|
||||
#include "prototypes.h"
|
||||
|
||||
/*
|
||||
/*
|
||||
* dolastlog - create lastlog entry
|
||||
*
|
||||
* A "last login" entry is created for the user being logged in. The
|
||||
|
||||
@@ -103,7 +103,7 @@ void login_prompt (const char *prompt, char *name, int namesize)
|
||||
(void) fflush (stdout);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Read the user's response. The trailing newline will be
|
||||
* removed.
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id$"
|
||||
|
||||
@@ -176,10 +176,10 @@ extern struct group *prefix_getgrnam(const char *name)
|
||||
struct group * grp = NULL;
|
||||
|
||||
fg = fopen(group_db_file, "rt");
|
||||
if(!fg)
|
||||
if (!fg)
|
||||
return NULL;
|
||||
while((grp = fgetgrent(fg)) != NULL) {
|
||||
if(!strcmp(name, grp->gr_name))
|
||||
while ((grp = fgetgrent(fg)) != NULL) {
|
||||
if (!strcmp(name, grp->gr_name))
|
||||
break;
|
||||
}
|
||||
fclose(fg);
|
||||
@@ -196,10 +196,10 @@ extern struct group *prefix_getgrgid(gid_t gid)
|
||||
struct group * grp = NULL;
|
||||
|
||||
fg = fopen(group_db_file, "rt");
|
||||
if(!fg)
|
||||
if (!fg)
|
||||
return NULL;
|
||||
while((grp = fgetgrent(fg)) != NULL) {
|
||||
if(gid == grp->gr_gid)
|
||||
while ((grp = fgetgrent(fg)) != NULL) {
|
||||
if (gid == grp->gr_gid)
|
||||
break;
|
||||
}
|
||||
fclose(fg);
|
||||
@@ -216,10 +216,10 @@ extern struct passwd *prefix_getpwuid(uid_t uid)
|
||||
struct passwd *pwd = NULL;
|
||||
|
||||
fg = fopen(passwd_db_file, "rt");
|
||||
if(!fg)
|
||||
if (!fg)
|
||||
return NULL;
|
||||
while((pwd = fgetpwent(fg)) != NULL) {
|
||||
if(uid == pwd->pw_uid)
|
||||
while ((pwd = fgetpwent(fg)) != NULL) {
|
||||
if (uid == pwd->pw_uid)
|
||||
break;
|
||||
}
|
||||
fclose(fg);
|
||||
@@ -236,10 +236,10 @@ extern struct passwd *prefix_getpwnam(const char* name)
|
||||
struct passwd *pwd = NULL;
|
||||
|
||||
fg = fopen(passwd_db_file, "rt");
|
||||
if(!fg)
|
||||
if (!fg)
|
||||
return NULL;
|
||||
while((pwd = fgetpwent(fg)) != NULL) {
|
||||
if(!strcmp(name, pwd->pw_name))
|
||||
while ((pwd = fgetpwent(fg)) != NULL) {
|
||||
if (!strcmp(name, pwd->pw_name))
|
||||
break;
|
||||
}
|
||||
fclose(fg);
|
||||
@@ -256,10 +256,10 @@ extern struct spwd *prefix_getspnam(const char* name)
|
||||
struct spwd *sp = NULL;
|
||||
|
||||
fg = fopen(spw_db_file, "rt");
|
||||
if(!fg)
|
||||
if (!fg)
|
||||
return NULL;
|
||||
while((sp = fgetspent(fg)) != NULL) {
|
||||
if(!strcmp(name, sp->sp_namp))
|
||||
while ((sp = fgetspent(fg)) != NULL) {
|
||||
if (!strcmp(name, sp->sp_namp))
|
||||
break;
|
||||
}
|
||||
fclose(fg);
|
||||
@@ -272,7 +272,7 @@ extern struct spwd *prefix_getspnam(const char* name)
|
||||
|
||||
extern void prefix_setpwent()
|
||||
{
|
||||
if(!passwd_db_file) {
|
||||
if (!passwd_db_file) {
|
||||
setpwent();
|
||||
return;
|
||||
}
|
||||
@@ -280,19 +280,19 @@ extern void prefix_setpwent()
|
||||
fclose (fp_pwent);
|
||||
|
||||
fp_pwent = fopen(passwd_db_file, "rt");
|
||||
if(!fp_pwent)
|
||||
if (!fp_pwent)
|
||||
return;
|
||||
}
|
||||
extern struct passwd* prefix_getpwent()
|
||||
{
|
||||
if(!passwd_db_file) {
|
||||
if (!passwd_db_file) {
|
||||
return getpwent();
|
||||
}
|
||||
return fgetpwent(fp_pwent);
|
||||
}
|
||||
extern void prefix_endpwent()
|
||||
{
|
||||
if(!passwd_db_file) {
|
||||
if (!passwd_db_file) {
|
||||
endpwent();
|
||||
return;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ extern void prefix_endpwent()
|
||||
|
||||
extern void prefix_setgrent()
|
||||
{
|
||||
if(!group_db_file) {
|
||||
if (!group_db_file) {
|
||||
setgrent();
|
||||
return;
|
||||
}
|
||||
@@ -311,19 +311,19 @@ extern void prefix_setgrent()
|
||||
fclose (fp_grent);
|
||||
|
||||
fp_grent = fopen(group_db_file, "rt");
|
||||
if(!fp_grent)
|
||||
if (!fp_grent)
|
||||
return;
|
||||
}
|
||||
extern struct group* prefix_getgrent()
|
||||
{
|
||||
if(!group_db_file) {
|
||||
if (!group_db_file) {
|
||||
return getgrent();
|
||||
}
|
||||
return fgetgrent(fp_grent);
|
||||
}
|
||||
extern void prefix_endgrent()
|
||||
{
|
||||
if(!group_db_file) {
|
||||
if (!group_db_file) {
|
||||
endgrent();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user