[linux-pam] #4: [PATCH] po/ja.po: Fix some wrong translations and so on
by fedora-badges
#4: [PATCH] po/ja.po: Fix some wrong translations and so on
--------------------+-------------------------------------------------------
Reporter: fumiyas | Owner: pam-developers(a)lists.fedorahosted.org
Type: defect | Status: new
Priority: major | Component: library
Version: 1.1.x | Keywords: l10n
--------------------+-------------------------------------------------------
I've updated po/ja.po to fix some wrong translations and so on.
Please see and commit the attached patch to master repository if you feel
good.
Should I contact the original translator (Kiyoto Hashida
<khashida(a)redhat.com>) to check and confirm this patch?
--
Ticket URL: <https://fedorahosted.org/linux-pam/ticket/4>
linux-pam <http://fedorahosted.org/linux-pam>
The Linux-PAM (Pluggable Authentication Modules) project
8 years, 11 months
[linux-pam] #5: multiple pam_namespace unmount problems
by fedora-badges
#5: multiple pam_namespace unmount problems
-----------------------------+------------------------------
Reporter: andersblomdell | Owner: pam-developers@…
Type: defect | Status: new
Priority: major | Component: library
Version: 1.1.x | Keywords:
Blocked By: | Blocking:
-----------------------------+------------------------------
This is essentially a short version of the bug in:
http://bugzilla.redhat.com/show_bug.cgi?id=755216
Essentially pam_namespace (1.1.5) suffers the following problems:
1. The (bind) mounts done in the new namespace is visible in the
original namespace (Error "too many levels of symbolic links").
2. At pam_namespace exit, the original mounting is restored for any
remaining child processes (daemons), which is a security problem.
Patch is attached
--
Ticket URL: <https://fedorahosted.org/linux-pam/ticket/5>
linux-pam <http://fedorahosted.org/linux-pam>
The Linux-PAM (Pluggable Authentication Modules) project
10 years, 2 months
[PATCH] pam_unix: use the only one pam_module struct with static build
by Ilya Matveychikov
PAM_UNIX is not able to run correctly with '--enable-static-modules' as
there are 4 pam_module structs defined: acct, auth, passwd and session.
This leads to impossibility of using standart config files with things
like 'auth require pam_unix.so'. So, merge all of theese structs into
the generic one -- _pam_unix_modstruct.
---
libpam/pam_static_modules.h | 10 ++--------
modules/pam_unix/Makefile.am | 2 +-
modules/pam_unix/pam_unix.c | 26 ++++++++++++++++++++++++++
modules/pam_unix/pam_unix_acct.c | 19 +++++--------------
modules/pam_unix/pam_unix_auth.c | 23 ++++++++++-------------
modules/pam_unix/pam_unix_passwd.c | 20 +++++---------------
modules/pam_unix/pam_unix_sess.c | 24 ++++++++++--------------
7 files changed, 59 insertions(+), 65 deletions(-)
create mode 100644 modules/pam_unix/pam_unix.c
diff --git a/libpam/pam_static_modules.h b/libpam/pam_static_modules.h
index 67d8135..2ae0cf9 100644
--- a/libpam/pam_static_modules.h
+++ b/libpam/pam_static_modules.h
@@ -80,10 +80,7 @@ extern struct pam_module _pam_timestamp_modstruct;
extern struct pam_module _pam_tty_audit_modstruct;
#endif
extern struct pam_module _pam_umask_modstruct;
-extern struct pam_module _pam_unix_acct_modstruct;
-extern struct pam_module _pam_unix_auth_modstruct;
-extern struct pam_module _pam_unix_passwd_modstruct;
-extern struct pam_module _pam_unix_session_modstruct;
+extern struct pam_module _pam_unix_modstruct;
extern struct pam_module _pam_userdb_modstruct;
extern struct pam_module _pam_warn_modstruct;
extern struct pam_module _pam_wheel_modstruct;
@@ -140,10 +137,7 @@ static struct pam_module *static_modules[] = {
&_pam_tty_audit_modstruct,
#endif
&_pam_umask_modstruct,
- &_pam_unix_acct_modstruct,
- &_pam_unix_auth_modstruct,
- &_pam_unix_passwd_modstruct,
- &_pam_unix_session_modstruct,
+ &_pam_unix_modstruct,
&_pam_userdb_modstruct,
&_pam_warn_modstruct,
&_pam_wheel_modstruct,
diff --git a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am
index ea5a731..d0bfed4 100644
--- a/modules/pam_unix/Makefile.am
+++ b/modules/pam_unix/Makefile.am
@@ -40,7 +40,7 @@ sbin_PROGRAMS = unix_chkpwd unix_update
noinst_PROGRAMS = bigcrypt
-pam_unix_la_SOURCES = bigcrypt.c pam_unix_acct.c \
+pam_unix_la_SOURCES = bigcrypt.c pam_unix.c pam_unix_acct.c \
pam_unix_auth.c pam_unix_passwd.c pam_unix_sess.c support.c \
passverify.c yppasswd_xdr.c md5_good.c md5_broken.c
diff --git a/modules/pam_unix/pam_unix.c b/modules/pam_unix/pam_unix.c
new file mode 100644
index 0000000..06b2d02
--- /dev/null
+++ b/modules/pam_unix/pam_unix.c
@@ -0,0 +1,26 @@
+#include "config.h"
+
+#include <security/pam_modules.h>
+
+/* pam_unix_auth.c */
+extern int pam_unix_sm_authenticate(pam_handle_t *, int, int, const char **);
+extern int pam_unix_sm_setcred(pam_handle_t *, int, int, const char **);
+/* pam_unix_acct.c */
+extern int pam_unix_sm_acct_mgmt(pam_handle_t *, int, int, const char **);
+/* pam_unix_sess.c */
+extern int pam_unix_sm_open_session(pam_handle_t *, int, int, const char **);
+extern int pam_unix_sm_close_session(pam_handle_t *, int, int, const char **);
+/* pam_unix_passwd.c */
+extern int pam_unix_sm_chauthtok(pam_handle_t *, int, int, const char **);
+
+#ifdef PAM_STATIC
+struct pam_module _pam_unix_modstruct = {
+ "pam_unix",
+ pam_unix_sm_authenticate,
+ pam_unix_sm_setcred,
+ pam_unix_sm_acct_mgmt,
+ pam_unix_sm_open_session,
+ pam_unix_sm_close_session,
+ pam_unix_sm_chauthtok,
+};
+#endif
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
index 2731b8b..2168301 100644
--- a/modules/pam_unix/pam_unix_acct.c
+++ b/modules/pam_unix/pam_unix_acct.c
@@ -178,8 +178,13 @@ int _unix_run_verify_binary(pam_handle_t *pamh, unsigned int ctrl,
* account management module.
*/
+#ifdef PAM_STATIC
+int pam_unix_sm_acct_mgmt(pam_handle_t * pamh, int flags,
+ int argc, const char **argv)
+#else
PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t * pamh, int flags,
int argc, const char **argv)
+#endif
{
unsigned int ctrl;
const void *void_uname;
@@ -291,17 +296,3 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t * pamh, int flags,
return retval;
}
-
-
-/* static module data */
-#ifdef PAM_STATIC
-struct pam_module _pam_unix_acct_modstruct = {
- "pam_unix_acct",
- NULL,
- NULL,
- pam_sm_acct_mgmt,
- NULL,
- NULL,
- NULL,
-};
-#endif
diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c
index d9c4ea5..0436f9b 100644
--- a/modules/pam_unix/pam_unix_auth.c
+++ b/modules/pam_unix/pam_unix_auth.c
@@ -98,9 +98,13 @@ setcred_free (pam_handle_t *pamh UNUSED, void *ptr, int err UNUSED)
free (ptr);
}
-
+#ifdef PAM_STATIC
+int pam_unix_sm_authenticate(pam_handle_t * pamh, int flags,
+ int argc, const char **argv)
+#else
PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags
,int argc, const char **argv)
+#endif
{
unsigned int ctrl;
int retval, *ret_data = NULL;
@@ -190,9 +194,14 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags
* warned you. -- AOY
*/
+#ifdef PAM_STATIC
+int pam_unix_sm_setcred(pam_handle_t *pamh, int flags UNUSED,
+ int argc UNUSED, const char **argv UNUSED)
+#else
PAM_EXTERN int
pam_sm_setcred (pam_handle_t *pamh, int flags UNUSED,
int argc UNUSED, const char **argv UNUSED)
+#endif
{
int retval;
const void *pretval = NULL;
@@ -213,15 +222,3 @@ pam_sm_setcred (pam_handle_t *pamh, int flags UNUSED,
return retval;
}
-
-#ifdef PAM_STATIC
-struct pam_module _pam_unix_auth_modstruct = {
- "pam_unix_auth",
- pam_sm_authenticate,
- pam_sm_setcred,
- NULL,
- NULL,
- NULL,
- NULL,
-};
-#endif
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index 631df31..703d8eb 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -521,9 +521,13 @@ static int _pam_unix_approve_pass(pam_handle_t * pamh
return retval;
}
-
+#ifdef PAM_STATIC
+int pam_unix_sm_chauthtok(pam_handle_t * pamh, int flags,
+ int argc, const char **argv)
+#else
PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
int argc, const char **argv)
+#endif
{
unsigned int ctrl, lctrl;
int retval;
@@ -821,17 +825,3 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
return retval;
}
-
-
-/* static module data */
-#ifdef PAM_STATIC
-struct pam_module _pam_unix_passwd_modstruct = {
- "pam_unix_passwd",
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- pam_sm_chauthtok,
-};
-#endif
diff --git a/modules/pam_unix/pam_unix_sess.c b/modules/pam_unix/pam_unix_sess.c
index 778062e..230c0b6 100644
--- a/modules/pam_unix/pam_unix_sess.c
+++ b/modules/pam_unix/pam_unix_sess.c
@@ -63,8 +63,13 @@
* session module.
*/
+#ifdef PAM_STATIC
+int pam_unix_sm_open_session(pam_handle_t * pamh, int flags,
+ int argc, const char **argv)
+#else
PAM_EXTERN int pam_sm_open_session(pam_handle_t * pamh, int flags,
int argc, const char **argv)
+#endif
{
char *user_name, *service;
unsigned int ctrl;
@@ -98,8 +103,13 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t * pamh, int flags,
return PAM_SUCCESS;
}
+#ifdef PAM_STATIC
+int pam_unix_sm_close_session(pam_handle_t * pamh, int flags,
+ int argc, const char **argv)
+#else
PAM_EXTERN int pam_sm_close_session(pam_handle_t * pamh, int flags,
int argc, const char **argv)
+#endif
{
char *user_name, *service;
unsigned int ctrl;
@@ -127,17 +137,3 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t * pamh, int flags,
return PAM_SUCCESS;
}
-
-/* static module data */
-#ifdef PAM_STATIC
-struct pam_module _pam_unix_session_modstruct = {
- "pam_unix_session",
- NULL,
- NULL,
- NULL,
- pam_sm_open_session,
- pam_sm_close_session,
- NULL,
-};
-#endif
-
--
1.7.8.3
12 years, 2 months
Add missing includes in pam_modutil.h
by Tomas Mraz
In pam_modutil.h we use multiple types that are defined in header files
that are not included there. They should be included. See also bug
report: https://bugzilla.redhat.com/show_bug.cgi?id=789176
However I think that different includes than unistd.h should be
included.
Please review the attached patch.
--
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb
12 years, 2 months
[PATCH] Make --disable-cracklib compatible with --enable-static-modules mode
by Dmitry V. Levin
* configure.in: Define HAVE_LIBCRACK when cracklib is enabled.
* libpam/pam_static_modules.h (static_modules): Guard the use of
_pam_cracklib_modstruct by HAVE_LIBCRACK macro.
---
configure.in | 5 ++++-
libpam/pam_static_modules.h | 2 ++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 15ff6dc..cba05ee 100644
--- a/configure.in
+++ b/configure.in
@@ -363,8 +363,11 @@ if test x"$WITH_CRACKLIB" != xno ; then
else
LIBCRACK=""
fi
+if test -n "$LIBCRACK"; then
+ AC_DEFINE([HAVE_LIBCRACK], [1], [Define to 1 if you have cracklib.])
+fi
AC_SUBST(LIBCRACK)
-AM_CONDITIONAL([HAVE_LIBCRACK], [test ! -z "$LIBCRACK"])
+AM_CONDITIONAL([HAVE_LIBCRACK], [test -n "$LIBCRACK"])
dnl Look for Linux Auditing library - see documentation
AC_ARG_ENABLE([audit],
diff --git a/libpam/pam_static_modules.h b/libpam/pam_static_modules.h
index 67d8135..b1739ed 100644
--- a/libpam/pam_static_modules.h
+++ b/libpam/pam_static_modules.h
@@ -94,7 +94,9 @@ extern struct pam_module _pam_xauth_modstruct;
static struct pam_module *static_modules[] = {
&_pam_access_modstruct,
+#ifdef HAVE_LIBCRACK
&_pam_cracklib_modstruct,
+#endif
&_pam_debug_modstruct,
&_pam_deny_modstruct,
&_pam_echo_modstruct,
--
ldv
12 years, 2 months