Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/compat/pam_compat.h
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-12-22 22:38:26 +0100
committerArthur de Jong <arthur@arthurdejong.org>2012-12-22 22:38:26 +0100
commitc7bb19c55c7a902e25bdd33b0d49a2ddcf62e07a (patch)
treeb3a75ef2719bc2f334041460fd21fbdf86a23a82 /compat/pam_compat.h
parentd336cd6b429f8ce40c58ea287f79bbc7c23d0966 (diff)
update C coding style to a more commonly used style
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1873 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'compat/pam_compat.h')
-rw-r--r--compat/pam_compat.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/compat/pam_compat.h b/compat/pam_compat.h
index 4109b77..ac94986 100644
--- a/compat/pam_compat.h
+++ b/compat/pam_compat.h
@@ -1,7 +1,7 @@
/*
pam_compat.h - provide a replacement definitions for some pam functions
- Copyright (C) 2009, 2010 Arthur de Jong
+ Copyright (C) 2009, 2010, 2011, 2012 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -48,32 +48,35 @@
/* define our own replacement pam_get_authtok() if it wasn't found */
#ifndef HAVE_PAM_GET_AUTHTOK
-int pam_get_authtok(pam_handle_t *pamh,int item,const char **authtok,const char *prompt);
+int pam_get_authtok(pam_handle_t *pamh, int item, const char **authtok,
+ const char *prompt);
#endif /* not HAVE_PAM_GET_AUTHTOK */
/* replace pam_prompt() if needed */
#ifndef HAVE_PAM_PROMPT
-int pam_prompt(pam_handle_t *pamh,int style,char **response,const char *format,...)
- LIKE_PRINTF(4,5);
+int pam_prompt(pam_handle_t *pamh, int style, char **response,
+ const char *format, ...)
+ LIKE_PRINTF(4, 5);
#endif /* not HAVE_PAM_PROMPT */
/* provide pam_info() if needed */
#ifndef pam_info
-#define pam_info(pamh,format...) \
- pam_prompt(pamh,PAM_TEXT_INFO,NULL,##format)
+#define pam_info(pamh, format...) \
+ pam_prompt(pamh, PAM_TEXT_INFO, NULL, ##format)
#endif /* not pam_info */
/* provide pam_error() if needed */
#ifndef pam_error
-#define pam_error(pamh,format...) \
- pam_prompt(pamh,PAM_ERROR_MSG,NULL,##format)
+#define pam_error(pamh, format...) \
+ pam_prompt(pamh, PAM_ERROR_MSG, NULL, ##format)
#endif /* not pam_error */
/* fall back to using getpwnam() if pam_modutil_getpwnam() isn't defined */
#ifndef HAVE_PAM_MODUTIL_GETGWNAM
#include <sys/types.h>
#include <pwd.h>
-#define pam_modutil_getpwnam(pamh,user) getpwnam(user)
+#define pam_modutil_getpwnam(pamh, user) \
+ getpwnam(user)
#endif /* not HAVE_PAM_MODUTIL_GETGWNAM */
/* fall back to using syslog() if pam_syslog() doesn't exist */
@@ -81,8 +84,8 @@ int pam_prompt(pam_handle_t *pamh,int style,char **response,const char *format,.
#ifndef LOG_AUTHPRIV
#define LOG_AUTHPRIV LOG_AUTH
#endif /* not LOG_AUTHPRIV */
-#define pam_syslog(pamh,priority,format...) \
- syslog(LOG_AUTHPRIV|(priority),##format)
+#define pam_syslog(pamh, priority, format...) \
+ syslog(LOG_AUTHPRIV|(priority), ##format)
#endif /* not HAVE_PAM_SYSLOG */
#endif /* _COMPAT_LDAP_COMPAT_H */