summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2003-07-13 20:01:44 +0000
committerSteve Langasek <vorlon@debian.org>2003-07-13 20:01:44 +0000
commit8e75c66582868ef647aa80f3d36c0985e0b394b8 (patch)
treed28a1859cf0432f4a53555c16b30e75d54e899e4
parentd9628ff6eb4c6807123496f3a3195c5e3ea32aba (diff)
Relevant BUGIDs: 770645
Purpose of commit: cleanup Commit summary: --------------- Fix the many compile-time warnings caused by features.h being included before our _pam_aconf.h. This should make it much easier to find other bugs. Also, call config.status instead of configure, to allow rebuilding generated files with the same options.
-rw-r--r--Makefile6
-rw-r--r--_pam_aconf.h.in3
-rw-r--r--libpam/pam_account.c4
-rw-r--r--libpam/pam_auth.c4
-rw-r--r--libpam/pam_data.c4
-rw-r--r--libpam/pam_delay.c2
-rw-r--r--libpam/pam_dispatch.c4
-rw-r--r--libpam/pam_end.c4
-rw-r--r--libpam/pam_env.c5
-rw-r--r--libpam/pam_handlers.c4
-rw-r--r--libpam/pam_item.c4
-rw-r--r--libpam/pam_misc.c4
-rw-r--r--libpam/pam_password.c6
-rw-r--r--libpam/pam_session.c4
-rw-r--r--libpam/pam_start.c4
-rw-r--r--modules/pammodutil/modutil_getlogin.c4
16 files changed, 31 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index 06c162fd..d4afd221 100644
--- a/Makefile
+++ b/Makefile
@@ -41,10 +41,8 @@ maintainer-clean: distclean
# NB _pam_aconf.h.in changes will remake this too
Make.Rules: configure Make.Rules.in _pam_aconf.h.in
- @echo XXX - not sure how to preserve past configure options..
- @echo XXX - so not attempting to. Feel free to run ./configure
- @echo XXX - by hand, with the options you want.
- ./configure
+ ./config.status --recheck
+ ./config.status
_pam_aconf.h: Make.Rules
diff --git a/_pam_aconf.h.in b/_pam_aconf.h.in
index 0569554d..99294d63 100644
--- a/_pam_aconf.h.in
+++ b/_pam_aconf.h.in
@@ -21,9 +21,6 @@
#ifdef HAVE_FEATURES_H
# define _SVID_SOURCE
# define _BSD_SOURCE
-# define __USE_BSD
-# define __USE_SVID
-# define __USE_MISC
# define _GNU_SOURCE
# include <features.h>
#endif /* HAVE_FEATURES_H */
diff --git a/libpam/pam_account.c b/libpam/pam_account.c
index 71e04f15..3a4fb1fc 100644
--- a/libpam/pam_account.c
+++ b/libpam/pam_account.c
@@ -1,9 +1,9 @@
/* pam_account.c - PAM Account Management */
-#include <stdio.h>
-
#include "pam_private.h"
+#include <stdio.h>
+
int pam_acct_mgmt(pam_handle_t *pamh, int flags)
{
int retval;
diff --git a/libpam/pam_auth.c b/libpam/pam_auth.c
index dbbdf00f..c945ebfc 100644
--- a/libpam/pam_auth.c
+++ b/libpam/pam_auth.c
@@ -5,11 +5,11 @@
*
*/
+#include "pam_private.h"
+
#include <stdio.h>
#include <stdlib.h>
-#include "pam_private.h"
-
int pam_authenticate(pam_handle_t *pamh, int flags)
{
int retval;
diff --git a/libpam/pam_data.c b/libpam/pam_data.c
index 06aa837f..2a0ea989 100644
--- a/libpam/pam_data.c
+++ b/libpam/pam_data.c
@@ -4,11 +4,11 @@
* $Id$
*/
+#include "pam_private.h"
+
#include <stdlib.h>
#include <string.h>
-#include "pam_private.h"
-
static struct pam_data *_pam_locate_data(const pam_handle_t *pamh,
const char *name)
{
diff --git a/libpam/pam_delay.c b/libpam/pam_delay.c
index d38d47bc..a9cfa802 100644
--- a/libpam/pam_delay.c
+++ b/libpam/pam_delay.c
@@ -13,9 +13,9 @@
* attempt to overcome authentication-time attacks in a simple manner.
*/
+#include "pam_private.h"
#include <unistd.h>
#include <time.h>
-#include "pam_private.h"
/* **********************************************************************
* initialize the time as unset, this is set on the return from the
diff --git a/libpam/pam_dispatch.c b/libpam/pam_dispatch.c
index 3ebdb5ba..c6fcd5f8 100644
--- a/libpam/pam_dispatch.c
+++ b/libpam/pam_dispatch.c
@@ -6,11 +6,11 @@
* $Id$
*/
+#include "pam_private.h"
+
#include <stdlib.h>
#include <stdio.h>
-#include "pam_private.h"
-
/*
* this is the return code we return when a function pointer is NULL
* or, the handler structure indicates a broken module config line
diff --git a/libpam/pam_end.c b/libpam/pam_end.c
index 735da62e..2226eaae 100644
--- a/libpam/pam_end.c
+++ b/libpam/pam_end.c
@@ -4,10 +4,10 @@
* $Id$
*/
-#include <stdlib.h>
-
#include "pam_private.h"
+#include <stdlib.h>
+
int pam_end(pam_handle_t *pamh, int pam_status)
{
int ret;
diff --git a/libpam/pam_env.c b/libpam/pam_env.c
index 86a2889e..d5a26ccb 100644
--- a/libpam/pam_env.c
+++ b/libpam/pam_env.c
@@ -10,14 +10,15 @@
* $Id$
*/
+#include "pam_private.h"
+
#include <string.h>
#include <stdlib.h>
+
#ifdef sunos
#define memmove(x,y,z) bcopy(y,x,z)
#endif
-#include "pam_private.h"
-
/* helper functions */
#ifdef DEBUG
diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c
index 62b7446c..b1e95685 100644
--- a/libpam/pam_handlers.c
+++ b/libpam/pam_handlers.c
@@ -8,6 +8,8 @@
*
*/
+#include "pam_private.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -24,8 +26,6 @@
# endif /* PAM_SHL */
#endif /* PAM_DYNAMIC */
-#include "pam_private.h"
-
/* If not required, define as nothing */
#ifndef SHLIB_SYM_PREFIX
# define SHLIB_SYM_PREFIX ""
diff --git a/libpam/pam_item.c b/libpam/pam_item.c
index 2b4c32ef..47686411 100644
--- a/libpam/pam_item.c
+++ b/libpam/pam_item.c
@@ -4,13 +4,13 @@
* $Id$
*/
+#include "pam_private.h"
+
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
-#include "pam_private.h"
-
#define RESET(X, Y) \
{ \
char *_TMP_ = (X); \
diff --git a/libpam/pam_misc.c b/libpam/pam_misc.c
index bd4ed958..796656d4 100644
--- a/libpam/pam_misc.c
+++ b/libpam/pam_misc.c
@@ -4,6 +4,8 @@
* $Id$
*/
+#include "pam_private.h"
+
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
@@ -11,8 +13,6 @@
#include <syslog.h>
#include <ctype.h>
-#include "pam_private.h"
-
/* caseless string comparison: POSIX does not define this.. */
int _pam_strCMP(const char *s, const char *t)
{
diff --git a/libpam/pam_password.c b/libpam/pam_password.c
index 8e36971e..bfe41029 100644
--- a/libpam/pam_password.c
+++ b/libpam/pam_password.c
@@ -4,13 +4,13 @@
* $Id$
*/
-#include <stdio.h>
-#include <stdlib.h>
-
/* #define DEBUG */
#include "pam_private.h"
+#include <stdio.h>
+#include <stdlib.h>
+
int pam_chauthtok(pam_handle_t *pamh, int flags)
{
int retval;
diff --git a/libpam/pam_session.c b/libpam/pam_session.c
index 16b021df..98125ba6 100644
--- a/libpam/pam_session.c
+++ b/libpam/pam_session.c
@@ -4,10 +4,10 @@
* $Id$
*/
-#include <stdio.h>
-
#include "pam_private.h"
+#include <stdio.h>
+
int pam_open_session(pam_handle_t *pamh, int flags)
{
D(("called"));
diff --git a/libpam/pam_start.c b/libpam/pam_start.c
index 7febeb8d..ef1dae1d 100644
--- a/libpam/pam_start.c
+++ b/libpam/pam_start.c
@@ -7,14 +7,14 @@
*
*/
+#include "pam_private.h"
+
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <syslog.h>
-#include "pam_private.h"
-
int pam_start (
const char *service_name,
const char *user,
diff --git a/modules/pammodutil/modutil_getlogin.c b/modules/pammodutil/modutil_getlogin.c
index b624def1..28616337 100644
--- a/modules/pammodutil/modutil_getlogin.c
+++ b/modules/pammodutil/modutil_getlogin.c
@@ -6,12 +6,12 @@
* there.
*/
+#include "pammodutil.h"
+
#include <stdlib.h>
#include <unistd.h>
#include <utmp.h>
-#include "pammodutil.h"
-
#define _PAMMODUTIL_GETLOGIN "_pammodutil_getlogin"
const char *_pammodutil_getlogin(pam_handle_t *pamh)