freebsd-ports/net/nss_ldap/files/patch-ldap-pwd.c
Cheng-Lung Sung c5a6067866 - In some cases (like sudo), we should check euid not uid, thanks for
jnlin at csie.nctu.edu.tw
- Use MAN5PREFIX
- portlint warns:
  1) IGNORE should be lowercase-lead
  2) INSTALLS_SHLIB should be replaced by USE_LDCONFIG
  3) PLIST_FILES should be used when only two files
- Bump PORTREVISION

PR:		ports/104310
Submitted by:	Gea-Suan Lin <gslin_AT_gslin dot org>
Approved by:	maintainer (timeout)
2006-12-20 02:31:17 +00:00

29 lines
698 B
C

--- ldap-pwd.c.orig Fri Feb 24 11:02:50 2006
+++ ldap-pwd.c Thu May 11 14:52:42 2006
@@ -21,7 +21,10 @@
static char rcsId[] =
"$Id: ldap-pwd.c,v 2.46 2006/01/11 18:03:49 lukeh Exp $";
+#include <sys/types.h>
+#include <unistd.h>
#include "config.h"
+
#ifdef HAVE_PORT_BEFORE_H
#include <port_before.h>
@@ -90,9 +93,13 @@
size_t tmplen;
char *tmp;
- if (_nss_ldap_oc_check (e, "shadowAccount") == NSS_SUCCESS)
- {
+/* if (_nss_ldap_oc_check (e, "shadowAccount") == NSS_SUCCESS)
+ * {
+ */
/* don't include password for shadowAccount */
+ if (geteuid() != 0)
+ {
+ /* don't include password for non-root users */
if (buflen < 3)
return NSS_TRYAGAIN;