]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
* libmisc/console.c, libmisc/ulimit.c, lib/sgetgrent.c,
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 11:59:01 +0000 (11:59 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 11:59:01 +0000 (11:59 +0000)
  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).

13 files changed:
ChangeLog
lib/commonio.h
lib/prototypes.h
lib/pwio.c
lib/pwio.h
lib/sgetgrent.c
lib/sgetpwent.c
lib/sgroupio.c
lib/sgroupio.h
lib/shadowio.c
lib/shadowio.h
libmisc/console.c
libmisc/ulimit.c

index 2f1a336f797da9fb130d1dfb6039f7e60c541cd1..43483993f57df7bfaf8afbc9fecf5b6c6460d7af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index ae9deb92220b3f13e30eb638920131603114d33c..ced92a3b8c73c836520f2fb9112d5a05be16d77f 100644 (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
index c5a73019f93c51208dedc71e95699c833e98a900..97a81a3518c5f23a1c026e82ad16553e7bc0f0fd 100644 (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 *);
index cbedb04b9a489896900a15cf6648add8a85bf84a..8dd6d61a08103c25aea05bc3dd2214cb3155e050 100644 (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)
 {
index 20118cfb3655ad9ba9cbe4d272c28f53e276a5ea..e060ed051a8cb3aab5fbb45381f4f639166350c5 100644 (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);
index 83b954493ea18b3b686d87269d04add987682df2..4189fb1b5296d3976982ca30f9f0ac6e46829c29 100644 (file)
 #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
  *
index 3dce67658a4802625bc01807382ab3289973c066..bf1ed6142d875575c105a98473a5c0ff2deebd48 100644 (file)
 #include "defines.h"
 #include <stdio.h>
 #include <pwd.h>
+#include "prototypes.h"
+
 #define        NFIELDS 7
+
 /*
  * sgetpwent - convert a string to a (struct passwd)
  *
index dad92f4c0ffc4d053ca5217af5878041831012bc..1fd09e279b1d521b22b8ddd88d4c6ebbb7e1db5d 100644 (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
index 90693b0f3421ba3ce7961f21642d5907f577e8da..095e5839003dce401d739781a7f5cae07cce3789 100644 (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 *);
index 61b76ac1dbd1723a217395ce49e12d71d13c2409..12395c42baadcaf3f4a3e9a2f017ba11a7479322 100644 (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 ());
 }
index d5866079b03c48c89ab76f265c5bb1c24aba172d..3dfdd67e386e6d4eb262d87f8cd58de06b9d04e1 100644 (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 *);
index 388587c40b10386ea19f639db62b2874aa55f5fe..073d0d8aee5dd7bac34ac6cf55b54951083f8f8a 100644 (file)
@@ -31,6 +31,7 @@
 #include "defines.h"
 #include <stdio.h>
 #include "getdef.h"
+#include "prototypes.h"
 
 #ident "$Id$"
 
index 549c2d38d06d41c56a057de887c452056a88f064..35b3adee03b1ec4b7bda862e9fe796b5f9eadae9 100644 (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