]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include: move pamfail.h to auth.c
authorSami Kerola <kerolasa@iki.fi>
Sun, 30 Jul 2017 10:32:37 +0000 (11:32 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sat, 5 Aug 2017 08:58:18 +0000 (09:58 +0100)
This removes one small header file, and makes inline function to static to
only file it is used in.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include/Makemodule.am
include/pamfail.h [deleted file]
login-utils/auth.c

index 237400b0562db54ddf2807ec04f2b91ce2fd7c84..e9b1e3021dd606a036505bd0d6b1dc66bdd9d0a9 100644 (file)
@@ -33,7 +33,6 @@ dist_noinst_HEADERS += \
        include/nls.h \
        include/optutils.h \
        include/pager.h \
-       include/pamfail.h \
        include/partx.h \
        include/path.h \
        include/pathnames.h \
diff --git a/include/pamfail.h b/include/pamfail.h
deleted file mode 100644 (file)
index bb83b94..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * No copyright is claimed.  This code is in the public domain; do with
- * it what you wish.
- *
- * Written by Karel Zak <kzak@redhat.com>
- */
-#ifndef UTIL_LINUX_PAMFAIL_H
-#include <security/pam_appl.h>
-#ifdef HAVE_SECURITY_PAM_MISC_H
-# include <security/pam_misc.h>
-#elif defined(HAVE_SECURITY_OPENPAM_H)
-# include <security/openpam.h>
-#endif
-#include "c.h"
-
-static inline int
-pam_fail_check(pam_handle_t *pamh, int retcode)
-{
-       if (retcode == PAM_SUCCESS)
-               return 0;
-       warnx("%s", pam_strerror(pamh, retcode));
-       pam_end(pamh, retcode);
-       return 1;
-}
-
-#endif /* UTIL_LINUX_PAMFAIL_H */
index aaf6c536b3484877db0564b13648bd73cb2c3718..fdeb12bbcee0c1b3f0fb054f9213e270abfe0d79 100644 (file)
@@ -7,8 +7,25 @@
  *   there is no warranty.
  *
  */
+
+#include <security/pam_appl.h>
+#ifdef HAVE_SECURITY_PAM_MISC_H
+# include <security/pam_misc.h>
+#elif defined(HAVE_SECURITY_OPENPAM_H)
+# include <security/openpam.h>
+#endif
+
+#include "c.h"
 #include "auth.h"
-#include "pamfail.h"
+
+static int pam_fail_check(pam_handle_t *pamh, int retcode)
+{
+       if (retcode == PAM_SUCCESS)
+               return 0;
+       warnx("%s", pam_strerror(pamh, retcode));
+       pam_end(pamh, retcode);
+       return 1;
+}
 
 int auth_pam(const char *service_name, uid_t uid, const char *username)
 {