* libmisc/console.c, libmisc/ulimit.c, lib/sgetgrent.c,

lib/sgetpwent.c: Include "prototypes.h" to make
  sure the exported prototypes are the ones used for the definition
  of functions.
* lib/prototypes.h: Added prototypes for __gr_del_entry(),
  __gr_get_db(), __gr_get_head(), __gr_set_changed(), __gr_dup(),
  __pw_del_entry(), __pw_get_db(), __pw_get_head(), __pw_dup(),
  sgetgrent(), sgetpwent(), __sgr_del_entry(), __sgr_dup(),
  __sgr_get_head(), __sgr_set_changed(), __spw_get_head(),
  __spw_del_entry(), __spw_dup().
* lib/prototypes.h: Removed prototype for is_listed().
* lib/prototypes.h: Added name of the check_su_auth()'s parameters.
* lib/groupio.h: Removed prototypes for __gr_dup() and
  __gr_set_changed().
* lib/sgroupio.c: Removed prototypes for putsgent(), sgetsgent(),
  and __gr_get_db().
* lib/sgroupio.h: Removed prototypes for __sgr_dup() and
  __sgr_set_changed().
* lib/shadowio.c: Removed prototype for __pw_get_db().
* lib/pwio.c: Removed prototype for sgetpwent() and putpwent().
* lib/shadowio.h: Removed prototypes for __spw_dup() and
  __spw_set_changed().
* lib/pwio.h: Removed prototypes for __pw_dup() and
  __pw_set_changed().
* lib/commonio.h: Add protection against multiple inclusions.
* lib/prototypes.h: Include commonio.h (needed for the
  __xx_del_entry() functions).
This commit is contained in:
nekral-guest 2008-01-06 11:59:01 +00:00
parent 747e174bec
commit 569a3b8e59
13 changed files with 83 additions and 18 deletions

View File

@ -1,3 +1,33 @@
2008-01-06 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/console.c, libmisc/ulimit.c, lib/sgetgrent.c,
lib/sgetpwent.c: Include "prototypes.h" to make
sure the exported prototypes are the ones used for the definition
of functions.
* lib/prototypes.h: Added prototypes for __gr_del_entry(),
__gr_get_db(), __gr_get_head(), __gr_set_changed(), __gr_dup(),
__pw_del_entry(), __pw_get_db(), __pw_get_head(), __pw_dup(),
sgetgrent(), sgetpwent(), __sgr_del_entry(), __sgr_dup(),
__sgr_get_head(), __sgr_set_changed(), __spw_get_head(),
__spw_del_entry(), __spw_dup().
* lib/prototypes.h: Removed prototype for is_listed().
* lib/prototypes.h: Added name of the check_su_auth()'s parameters.
* lib/groupio.h: Removed prototypes for __gr_dup() and
__gr_set_changed().
* lib/sgroupio.c: Removed prototypes for putsgent(), sgetsgent(),
and __gr_get_db().
* lib/sgroupio.h: Removed prototypes for __sgr_dup() and
__sgr_set_changed().
* lib/shadowio.c: Removed prototype for __pw_get_db().
* lib/pwio.c: Removed prototype for sgetpwent() and putpwent().
* lib/shadowio.h: Removed prototypes for __spw_dup() and
__spw_set_changed().
* lib/pwio.h: Removed prototypes for __pw_dup() and
__pw_set_changed().
* lib/commonio.h: Add protection against multiple inclusions.
* lib/prototypes.h: Include commonio.h (needed for the
__xx_del_entry() functions).
2008-01-05 Nicolas François <nicolas.francois@centraliens.net>
* man/groupadd.8.xml, man/groupmod.8.xml: Add documentation for

View File

@ -1,4 +1,6 @@
/* $Id$ */
#ifndef _COMMONIO_H
#define _COMMONIO_H
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
@ -117,3 +119,5 @@ extern int commonio_sort_wrt (struct commonio_db *shadow,
struct commonio_db *passwd);
extern int commonio_sort (struct commonio_db *db,
int (*cmp) (const void *, const void *));
#endif

View File

@ -1,7 +1,7 @@
/*
* prototypes.h
*
* lib and libmisc function prototypes
* prototypes of libmisc functions, and private lib functions.
*
* $Id$
*
@ -22,6 +22,7 @@
#include <lastlog.h>
#include "defines.h"
#include "commonio.h"
/* addgrps.c */
extern int add_groups (const char *);
@ -44,7 +45,6 @@ extern void chown_tty (const char *, const struct passwd *);
/* console.c */
extern int console (const char *);
extern int is_listed (const char *, const char *, int);
/* copydir.c */
extern int copy_tree (const char *src_root, const char *dst_root,
@ -74,6 +74,15 @@ extern int getlong(const char *numstr, long int *result);
extern char *fgetsx (char *, int, FILE *);
extern int fputsx (const char *, FILE *);
/* groupio.c */
extern void __gr_del_entry (const struct commonio_entry *ent);
extern struct commonio_db *__gr_get_db (void);
extern struct commonio_entry *__gr_get_head (void);
extern void __gr_set_changed (void);
/* groupmem.c */
extern struct group *__gr_dup (const struct group *grent);
/* hushed.c */
extern int hushed (const struct passwd *);
@ -131,11 +140,19 @@ extern void passwd_check (const char *, const char *, const char *);
/* pwd_init.c */
extern void pwd_init (void);
/* pwio.c */
extern void __pw_del_entry (const struct commonio_entry *ent);
extern struct commonio_db *__pw_get_db (void);
extern struct commonio_entry *__pw_get_head (void);
/* pwmem.c */
extern struct passwd *__pw_dup (const struct passwd *pwent);
/* rlogin.c */
extern int do_rlogin (const char *, char *, int, char *, int);
/* salt.c */
extern char *crypt_make_salt (char *meth, void *arg);
extern char *crypt_make_salt (const char *meth, void *arg);
/* setugid.c */
extern int setup_groups (const struct passwd *);
@ -148,6 +165,25 @@ extern void setup (struct passwd *);
/* setupenv.c */
extern void setup_env (struct passwd *);
/* sgetgrent.c */
extern struct group *sgetgrent (const char *buf);
/* sgetpwent.c */
extern struct passwd *sgetpwent (const char *buf);
/* sgroupio.c */
extern void __sgr_del_entry (const struct commonio_entry *ent);
extern struct sgrp *__sgr_dup (const struct sgrp *sgent);
extern struct commonio_entry *__sgr_get_head (void);
extern void __sgr_set_changed (void);
/* shadowio.c */
extern struct commonio_entry *__spw_get_head (void);
extern void __spw_del_entry (const struct commonio_entry *ent);
/* shadowmem.c */
extern struct spwd *__spw_dup (const struct spwd *spent);
/* shell.c */
extern int shell (const char *, const char *, char *const *);
@ -155,7 +191,7 @@ extern int shell (const char *, const char *, char *const *);
extern long strtoday (const char *);
/* suauth.c */
extern int check_su_auth (const char *, const char *);
extern int check_su_auth (const char *actual_id, const char *wanted_id);
/* sulog.c */
extern void sulog (const char *, int, const char *, const char *);

View File

@ -9,8 +9,6 @@
#include <stdio.h>
#include "commonio.h"
#include "pwio.h"
extern struct passwd *sgetpwent (const char *);
extern int putpwent (const struct passwd *, FILE *);
static void *passwd_dup (const void *ent)
{

View File

@ -1,5 +1,3 @@
extern struct passwd *__pw_dup (const struct passwd *);
extern void __pw_set_changed (void);
extern int pw_close (void);
extern const struct passwd *pw_locate (const char *);
extern int pw_lock (void);

View File

@ -34,7 +34,10 @@
#include <stdio.h>
#include <grp.h>
#include "defines.h"
#include "prototypes.h"
#define NFIELDS 4
/*
* list - turn a comma-separated string into an array of (char *)'s
*

View File

@ -35,7 +35,10 @@
#include "defines.h"
#include <stdio.h>
#include <pwd.h>
#include "prototypes.h"
#define NFIELDS 7
/*
* sgetpwent - convert a string to a (struct passwd)
*

View File

@ -9,8 +9,6 @@
#include "defines.h"
#include "commonio.h"
#include "sgroupio.h"
extern int putsgent (const struct sgrp *, FILE *);
extern struct sgrp *sgetsgent (const char *);
struct sgrp *__sgr_dup (const struct sgrp *sgent)
{
@ -194,8 +192,6 @@ void __sgr_del_entry (const struct commonio_entry *ent)
/* Sort with respect to group ordering. */
int sgr_sort ()
{
extern struct commonio_db *__gr_get_db ();
return commonio_sort_wrt (&gshadow_db, __gr_get_db ());
}
#else

View File

@ -1,5 +1,3 @@
extern struct sgrp *__sgr_dup (const struct sgrp *);
extern void __sgr_set_changed (void);
extern int sgr_close (void);
extern int sgr_file_present (void);
extern const struct sgrp *sgr_locate (const char *);

View File

@ -141,7 +141,5 @@ void __spw_del_entry (const struct commonio_entry *ent)
/* Sort with respect to passwd ordering. */
int spw_sort ()
{
extern struct commonio_db *__pw_get_db ();
return commonio_sort_wrt (&shadow_db, __pw_get_db ());
}

View File

@ -1,5 +1,3 @@
extern struct spwd *__spw_dup (const struct spwd *);
extern void __spw_set_changed (void);
extern int spw_close (void);
extern int spw_file_present (void);
extern const struct spwd *spw_locate (const char *);

View File

@ -31,6 +31,7 @@
#include "defines.h"
#include <stdio.h>
#include "getdef.h"
#include "prototypes.h"
#ident "$Id$"

View File

@ -16,6 +16,8 @@
/* XXX - is the above ok or should it be <time.h> on ultrix? */
#include <sys/resource.h>
#endif
#include "prototypes.h"
void set_filesize_limit (int blocks)
{
#if HAVE_ULIMIT_H