[linux-pam] doc: add missing build dependencies for soelim stubs
by Dmitry V. Levin
commit a31da1e8b443cbd74bfd51381897b0427719a8d1
Author: Dmitry V. Levin <ldv(a)altlinux.org>
Date: Mon Jun 30 21:53:26 2014 +0000
doc: add missing build dependencies for soelim stubs
* doc/man/Makefile.am [ENABLE_REGENERATE_MAN]: Add dependencies for
pam_verror.3, pam_vinfo.3, pam_vprompt.3, and pam_vsyslog.3 soelim stubs.
doc/man/Makefile.am | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 7da5bd4..78c891d 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -49,6 +49,10 @@ if ENABLE_REGENERATE_MAN
PAM.8: pam.8
pam_get_authtok_noverify.3: pam_get_authtok.3
pam_get_authtok_verify.3: pam_get_authtok.3
+pam_verror.3: pam_error.3
+pam_vinfo.3: pam_info.3
+pam_vprompt.3: pam_prompt.3
+pam_vsyslog.3: pam_syslog.3
pam.d.5: pam.conf.5
test -f $(srcdir)/pam\\.d.5 && mv $(srcdir)/pam\\.d.5 $(srcdir)/pam.d.5 ||:
9 years, 9 months
[linux-pam] doc: fix install in case of out of tree build (ticket #31)
by Dmitry V. Levin
commit 17a593d2de160086bcfc8ea5ce30ac987e79b488
Author: Dmitry V. Levin <ldv(a)altlinux.org>
Date: Thu May 8 23:36:58 2014 +0000
doc: fix install in case of out of tree build (ticket #31)
* doc/adg/Makefile.am (install-data-local, releasedocs): Fall back
to srcdir if documentation files haven't been found in builddir.
(releasedocs): Treat missing documentation files as an error.
* doc/mwg/Makefile.am: Likewise.
* doc/sag/Makefile.am: Likewise.
doc/adg/Makefile.am | 51 +++++++++++++++++++++++++++++++++------------------
doc/mwg/Makefile.am | 51 +++++++++++++++++++++++++++++++++------------------
doc/sag/Makefile.am | 51 +++++++++++++++++++++++++++++++++------------------
3 files changed, 99 insertions(+), 54 deletions(-)
---
diff --git a/doc/adg/Makefile.am b/doc/adg/Makefile.am
index aedc033..77bd7a9 100644
--- a/doc/adg/Makefile.am
+++ b/doc/adg/Makefile.am
@@ -57,20 +57,26 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(docdir)
$(mkinstalldirs) $(DESTDIR)$(pdfdir)
$(mkinstalldirs) $(DESTDIR)$(htmldir)
- test -f html/Linux-PAM_ADG.html || exit 0; \
+ if test -f html/Linux-PAM_ADG.html; then \
$(install_sh_DATA) html/Linux-PAM_ADG.html html/adg-*.html \
- $(DESTDIR)$(htmldir)/ || \
+ $(DESTDIR)$(htmldir)/; \
+ elif test -f $(srcdir)/html/Linux-PAM_ADG.html; then \
$(install_sh_DATA) $(srcdir)/html/Linux-PAM_ADG.html \
$(srcdir)/html/adg-*.html \
- $(DESTDIR)$(htmldir)/
- test -f Linux-PAM_ADG.txt || exit 0; \
- $(install_sh_DATA) Linux-PAM_ADG.txt $(DESTDIR)$(docdir)/ || \
+ $(DESTDIR)$(htmldir)/; \
+ fi
+ if test -f Linux-PAM_ADG.txt; then \
+ $(install_sh_DATA) Linux-PAM_ADG.txt $(DESTDIR)$(docdir)/; \
+ elif test -f $(srcdir)/Linux-PAM_ADG.txt; then \
$(install_sh_DATA) $(srcdir)/Linux-PAM_ADG.txt \
- $(DESTDIR)$(docdir)/
- test -f Linux-PAM_ADG.pdf || exit 0; \
- $(install_sh_DATA) Linux-PAM_ADG.pdf $(DESTDIR)$(pdfdir)/ || \
+ $(DESTDIR)$(docdir)/; \
+ fi
+ if test -f Linux-PAM_ADG.pdf; then \
+ $(install_sh_DATA) Linux-PAM_ADG.pdf $(DESTDIR)$(pdfdir)/; \
+ elif test -f $(srcdir)/Linux-PAM_ADG.pdf; then \
$(install_sh_DATA) $(srcdir)/Linux-PAM_ADG.pdf \
- $(DESTDIR)$(pdfdir)/
+ $(DESTDIR)$(pdfdir)/; \
+ fi
uninstall-local:
-rm $(DESTDIR)$(htmldir)/Linux-PAM_ADG.html
@@ -80,19 +86,28 @@ uninstall-local:
releasedocs: all
$(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html
- test -f html/Linux-PAM_ADG.html || exit 0; \
+ if test -f html/Linux-PAM_ADG.html; then \
cp -ap html/Linux-PAM_ADG.html html/adg-*.html \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html/; \
+ elif test -f $(srcdir)/html/Linux-PAM_ADG.html; then \
cp -ap $(srcdir)/html/Linux-PAM_ADG.html \
$(srcdir)/html/adg-*.html \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html/
- test -f Linux-PAM_ADG.txt || exit 0; \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html/; \
+ else exit 1; \
+ fi
+ if test -f Linux-PAM_ADG.txt; then \
cp -p Linux-PAM_ADG.txt \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/; \
+ elif test -f $(srcdir)/Linux-PAM_ADG.txt; then \
cp -p $(srcdir)/Linux-PAM_ADG.txt \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/
- test -f Linux-PAM_ADG.pdf || exit 0; \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/; \
+ else exit 1; \
+ fi
+ if test -f Linux-PAM_ADG.pdf; then \
cp -p Linux-PAM_ADG.pdf \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/; \
+ elif test -f $(srcdir)/Linux-PAM_ADG.pdf; then \
cp -p $(srcdir)/Linux-PAM_ADG.pdf \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/; \
+ else exit 1; \
+ fi
diff --git a/doc/mwg/Makefile.am b/doc/mwg/Makefile.am
index 1154036..2bbb2d0 100644
--- a/doc/mwg/Makefile.am
+++ b/doc/mwg/Makefile.am
@@ -57,20 +57,26 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(docdir)
$(mkinstalldirs) $(DESTDIR)$(pdfdir)
$(mkinstalldirs) $(DESTDIR)$(htmldir)
- test -f html/Linux-PAM_MWG.html || exit 0; \
+ if test -f html/Linux-PAM_MWG.html; then \
$(install_sh_DATA) html/Linux-PAM_MWG.html html/mwg-*.html \
- $(DESTDIR)$(htmldir)/ || \
+ $(DESTDIR)$(htmldir)/; \
+ elif test -f $(srcdir)/html/Linux-PAM_MWG.html; then \
$(install_sh_DATA) $(srcdir)/html/Linux-PAM_MWG.html \
$(srcdir)/html/mwg-*.html \
- $(DESTDIR)$(htmldir)/
- test -f Linux-PAM_MWG.txt || exit 0; \
- $(install_sh_DATA) Linux-PAM_MWG.txt $(DESTDIR)$(docdir)/ || \
+ $(DESTDIR)$(htmldir)/; \
+ fi
+ if test -f Linux-PAM_MWG.txt; then \
+ $(install_sh_DATA) Linux-PAM_MWG.txt $(DESTDIR)$(docdir)/; \
+ elif test -f $(srcdir)/Linux-PAM_MWG.txt; then \
$(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.txt \
- $(DESTDIR)$(docdir)/
- test -f Linux-PAM_MWG.pdf || exit 0; \
- $(install_sh_DATA) Linux-PAM_MWG.pdf $(DESTDIR)$(pdfdir)/ || \
+ $(DESTDIR)$(docdir)/; \
+ fi
+ if test -f Linux-PAM_MWG.pdf; then \
+ $(install_sh_DATA) Linux-PAM_MWG.pdf $(DESTDIR)$(pdfdir)/; \
+ elif test -f $(srcdir)/Linux-PAM_MWG.pdf; then \
$(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.pdf \
- $(DESTDIR)$(pdfdir)/
+ $(DESTDIR)$(pdfdir)/; \
+ fi
uninstall-local:
-rm $(DESTDIR)$(htmldir)/Linux-PAM_MWG.html
@@ -80,19 +86,28 @@ uninstall-local:
releasedocs: all
$(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html
- test -f html/Linux-PAM_MWG.html || exit 0; \
+ if test -f html/Linux-PAM_MWG.html; then \
cp -ap html/Linux-PAM_MWG.html html/mwg-*.html \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/; \
+ elif test -f $(srcdir)/html/Linux-PAM_MWG.html; then \
cp -ap $(srcdir)/html/Linux-PAM_MWG.html \
$(srcdir)/html/mwg-*.html \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/
- test -f Linux-PAM_MWG.txt || exit 0; \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/; \
+ else exit 1; \
+ fi
+ if test -f Linux-PAM_MWG.txt; then \
cp -p Linux-PAM_MWG.txt \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
+ elif test -f $(srcdir)/Linux-PAM_MWG.txt; then \
cp -p $(srcdir)/Linux-PAM_MWG.txt \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/
- test -f Linux-PAM_MWG.pdf || exit 0; \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
+ else exit 1; \
+ fi
+ if test -f Linux-PAM_MWG.pdf; then \
cp -p Linux-PAM_MWG.pdf \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
+ elif test -f $(srcdir)/Linux-PAM_MWG.pdf; then \
cp -p $(srcdir)/Linux-PAM_MWG.pdf \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
+ else exit 1; \
+ fi
diff --git a/doc/sag/Makefile.am b/doc/sag/Makefile.am
index 35b1669..31816aa 100644
--- a/doc/sag/Makefile.am
+++ b/doc/sag/Makefile.am
@@ -57,20 +57,26 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(docdir)
$(mkinstalldirs) $(DESTDIR)$(pdfdir)
$(mkinstalldirs) $(DESTDIR)$(htmldir)
- test -f html/Linux-PAM_SAG.html || exit 0; \
+ if test -f html/Linux-PAM_SAG.html; then \
$(install_sh_DATA) html/Linux-PAM_SAG.html html/sag-*.html \
- $(DESTDIR)$(htmldir)/ || \
+ $(DESTDIR)$(htmldir)/; \
+ elif test -f $(srcdir)/html/Linux-PAM_SAG.html; then \
$(install_sh_DATA) $(srcdir)/html/Linux-PAM_SAG.html \
$(srcdir)/html/sag-*.html \
- $(DESTDIR)$(htmldir)/
- test -f Linux-PAM_SAG.txt || exit 0; \
- $(install_sh_DATA) Linux-PAM_SAG.txt $(DESTDIR)$(docdir)/ || \
+ $(DESTDIR)$(htmldir)/; \
+ fi
+ if test -f Linux-PAM_SAG.txt; then \
+ $(install_sh_DATA) Linux-PAM_SAG.txt $(DESTDIR)$(docdir)/; \
+ elif test -f $(srcdir)/Linux-PAM_SAG.txt; then \
$(install_sh_DATA) $(srcdir)/Linux-PAM_SAG.txt \
- $(DESTDIR)$(docdir)/
- test -f Linux-PAM_SAG.pdf || exit 0; \
- $(install_sh_DATA) Linux-PAM_SAG.pdf $(DESTDIR)$(pdfdir)/ || \
+ $(DESTDIR)$(docdir)/; \
+ fi
+ if test -f Linux-PAM_SAG.pdf; then \
+ $(install_sh_DATA) Linux-PAM_SAG.pdf $(DESTDIR)$(pdfdir)/; \
+ elif test -f $(srcdir)/Linux-PAM_SAG.pdf; then \
$(install_sh_DATA) $(srcdir)/Linux-PAM_SAG.pdf \
- $(DESTDIR)$(pdfdir)/
+ $(DESTDIR)$(pdfdir)/; \
+ fi
uninstall-local:
-rm $(DESTDIR)$(htmldir)/Linux-PAM_SAG.html
@@ -80,19 +86,28 @@ uninstall-local:
releasedocs: all
$(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html
- test -f html/Linux-PAM_SAG.html || exit 0; \
+ if test -f html/Linux-PAM_SAG.html; then \
cp -ap html/Linux-PAM_SAG.html html/sag-*.html \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html/; \
+ elif test -f $(srcdir)/html/Linux-PAM_SAG.html; then \
cp -ap $(srcdir)/html/Linux-PAM_SAG.html \
$(srcdir)/html/sag-*.html \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html/
- test -f Linux-PAM_SAG.txt || exit 0; \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html/; \
+ else exit 1; \
+ fi
+ if test -f Linux-PAM_SAG.txt; then \
cp -p Linux-PAM_SAG.txt \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/; \
+ elif test -f $(srcdir)/Linux-PAM_SAG.txt; then \
cp -p $(srcdir)/Linux-PAM_SAG.txt \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/
- test -f Linux-PAM_SAG.pdf || exit 0; \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/; \
+ else exit 1; \
+ fi
+ if test -f Linux-PAM_SAG.pdf; then \
cp -p Linux-PAM_SAG.pdf \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/ || \
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/; \
+ elif test -f $(srcdir)/Linux-PAM_SAG.pdf; then \
cp -p $(srcdir)/Linux-PAM_SAG.pdf \
- $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/
+ $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/; \
+ else exit 1; \
+ fi
9 years, 9 months
[linux-pam] doc: fix installation of adg-*.html and mwg-*.html files (ticket #31)
by Dmitry V. Levin
commit 3860f8008025d3799010d9e60dee15fd1f092b49
Author: Dmitry V. Levin <ldv(a)altlinux.org>
Date: Thu May 8 23:36:58 2014 +0000
doc: fix installation of adg-*.html and mwg-*.html files (ticket #31)
Fix a typo due to which sag-*.html files might be installed instead of
adg-*.html and mwg-*.html files.
* doc/adg/Makefile.am (install-data-local): Install adg-*.html instead
of sag-*.html.
* doc/mwg/Makefile.am (install-data-local): Install mwg-*.html instead
of sag-*.html.
Patch-by: Mike Frysinger <vapier(a)gentoo.org>
doc/adg/Makefile.am | 2 +-
doc/mwg/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/doc/adg/Makefile.am b/doc/adg/Makefile.am
index 31bc233..aedc033 100644
--- a/doc/adg/Makefile.am
+++ b/doc/adg/Makefile.am
@@ -61,7 +61,7 @@ install-data-local:
$(install_sh_DATA) html/Linux-PAM_ADG.html html/adg-*.html \
$(DESTDIR)$(htmldir)/ || \
$(install_sh_DATA) $(srcdir)/html/Linux-PAM_ADG.html \
- $(srcdir)/html/sag-*.html \
+ $(srcdir)/html/adg-*.html \
$(DESTDIR)$(htmldir)/
test -f Linux-PAM_ADG.txt || exit 0; \
$(install_sh_DATA) Linux-PAM_ADG.txt $(DESTDIR)$(docdir)/ || \
diff --git a/doc/mwg/Makefile.am b/doc/mwg/Makefile.am
index 47b4854..1154036 100644
--- a/doc/mwg/Makefile.am
+++ b/doc/mwg/Makefile.am
@@ -61,7 +61,7 @@ install-data-local:
$(install_sh_DATA) html/Linux-PAM_MWG.html html/mwg-*.html \
$(DESTDIR)$(htmldir)/ || \
$(install_sh_DATA) $(srcdir)/html/Linux-PAM_MWG.html \
- $(srcdir)/html/sag-*.html \
+ $(srcdir)/html/mwg-*.html \
$(DESTDIR)$(htmldir)/
test -f Linux-PAM_MWG.txt || exit 0; \
$(install_sh_DATA) Linux-PAM_MWG.txt $(DESTDIR)$(docdir)/ || \
9 years, 9 months
[linux-pam] pam_limits: nofile refers to file descriptors not files
by Tomáš Mráz
commit 1a8c185146193174a26d8d66ed6f7880ea136f75
Author: Tomas Mraz <tmraz(a)fedoraproject.org>
Date: Thu Jun 19 15:32:08 2014 +0200
pam_limits: nofile refers to file descriptors not files
modules/pam_limits/limits.conf.5.xml: Correct documentation of nofile limit.
modules/pam_limits/limits.conf: Likewise.
modules/pam_limits/limits.conf | 2 +-
modules/pam_limits/limits.conf.5.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/modules/pam_limits/limits.conf b/modules/pam_limits/limits.conf
index fd66ab7..be621a7 100644
--- a/modules/pam_limits/limits.conf
+++ b/modules/pam_limits/limits.conf
@@ -21,7 +21,7 @@
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
-# - nofile - max number of open files
+# - nofile - max number of open file descriptors
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
diff --git a/modules/pam_limits/limits.conf.5.xml b/modules/pam_limits/limits.conf.5.xml
index f1e9ce9..96d7eea 100644
--- a/modules/pam_limits/limits.conf.5.xml
+++ b/modules/pam_limits/limits.conf.5.xml
@@ -178,7 +178,7 @@
<varlistentry>
<term><option>nofile</option></term>
<listitem>
- <para>maximum number of open files</para>
+ <para>maximum number of open file descriptors</para>
</listitem>
</varlistentry>
<varlistentry>
9 years, 9 months
[linux-pam] pam_limits: clarify documentation of maxlogins and maxsyslogins limits.
by Tomáš Mráz
commit 251126a06aa41ddee6d0df6b0762fccacc601763
Author: Tomas Mraz <tmraz(a)fedoraproject.org>
Date: Thu Jun 19 14:41:50 2014 +0200
pam_limits: clarify documentation of maxlogins and maxsyslogins limits.
modules/pam_limits/limits.conf.5.xml: clarify documentation of
maxlogins and maxsyslogins limits.
modules/pam_limits/limits.conf.5.xml | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/modules/pam_limits/limits.conf.5.xml b/modules/pam_limits/limits.conf.5.xml
index ecc6d5f..f1e9ce9 100644
--- a/modules/pam_limits/limits.conf.5.xml
+++ b/modules/pam_limits/limits.conf.5.xml
@@ -214,14 +214,17 @@
<varlistentry>
<term><option>maxlogins</option></term>
<listitem>
- <para>maximum number of logins for this user except
- for this with <emphasis>uid=0</emphasis></para>
+ <para>maximum number of logins for this user (this limit does
+ not apply to user with <emphasis>uid=0</emphasis>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>maxsyslogins</option></term>
<listitem>
- <para>maximum number of all logins on system</para>
+ <para>maximum number of all logins on system; user is not
+ allowed to log-in if total number of all users' logins is
+ greater than specified number (this limit does not apply to
+ user with <emphasis>uid=0</emphasis>)</para>
</listitem>
</varlistentry>
<varlistentry>
9 years, 9 months
[linux-pam] pam_unix: Check for NULL return from Goodcrypt_md5().
by Tomáš Mráz
commit aff9b0f2b67eac784c99536fede9423da66f194a
Author: Tomas Mraz <tmraz(a)fedoraproject.org>
Date: Thu Jun 19 13:51:20 2014 +0200
pam_unix: Check for NULL return from Goodcrypt_md5().
modules/pam_unix/pam_unix_passwd.c (check_old_password): Check for
NULL return from Goodcrypt_md5().
modules/pam_unix/pam_unix_passwd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index 606071e..2d330e5 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -301,7 +301,7 @@ static int check_old_password(const char *forwho, const char *newpass)
s_pas = strtok_r(NULL, ":,", &sptr);
while (s_pas != NULL) {
char *md5pass = Goodcrypt_md5(newpass, s_pas);
- if (!strcmp(md5pass, s_pas)) {
+ if (md5pass == NULL || !strcmp(md5pass, s_pas)) {
_pam_delete(md5pass);
retval = PAM_AUTHTOK_ERR;
break;
9 years, 9 months
[linux-pam] pam_unix: check for NULL return from malloc()
by Tomáš Mráz
commit 696d4cc68fb60461081e5f29c6ef3094feebac8d
Author: Tomas Mraz <tmraz(a)fedoraproject.org>
Date: Thu Jun 19 13:43:26 2014 +0200
pam_unix: check for NULL return from malloc()
* modules/pam_unix/md5_crypt.c (crypt_md5): Check for NULL return from malloc().
modules/pam_unix/md5_crypt.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/modules/pam_unix/md5_crypt.c b/modules/pam_unix/md5_crypt.c
index 53972fc..4ab9ec8 100644
--- a/modules/pam_unix/md5_crypt.c
+++ b/modules/pam_unix/md5_crypt.c
@@ -51,6 +51,8 @@ char *MD5Name(crypt_md5)(const char *pw, const char *salt)
/* TODO: now that we're using malloc'ed memory, get rid of the
strange constant buffer size. */
passwd = malloc(120);
+ if (passwd == NULL)
+ return NULL;
/* If it starts with the magic string, then skip that */
if (!strncmp(sp, magic, strlen(magic)))
9 years, 9 months