summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-29 13:20:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:53 -0500
commit86f79c402df9fca010719c4f7816ea35c3f42c75 (patch)
tree9b46093f709399b905442cf04153500338ceb12a /source3/passdb
parentfc1f6c7668037b09b9209bebc6f018bf4d3ff4f4 (diff)
downloadsamba-86f79c402df9fca010719c4f7816ea35c3f42c75.tar.gz
samba-86f79c402df9fca010719c4f7816ea35c3f42c75.tar.bz2
samba-86f79c402df9fca010719c4f7816ea35c3f42c75.zip
r23194: cherry pick two fixes from SAMBA_3_0_26
* strptime() failure check * make legcacy sid/uid/gid calls static (This used to be commit 3c9fb1c6f3263c0ce6edbf2a8824c153317a84a3)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/lookup_sid.c8
-rw-r--r--source3/passdb/pdb_ldap.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 05d7989c45..dbc0e75e59 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1138,7 +1138,7 @@ void store_gid_sid_cache(const DOM_SID *psid, gid_t gid)
*THE LEGACY* convert uid_t to SID function.
*****************************************************************/
-void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
+static void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
{
uint32 rid;
BOOL ret;
@@ -1172,7 +1172,7 @@ void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
*THE LEGACY* convert gid_t to SID function.
*****************************************************************/
-void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
+static void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
{
BOOL ret;
@@ -1203,7 +1203,7 @@ void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
*THE LEGACY* convert SID to uid function.
*****************************************************************/
-BOOL legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
+static BOOL legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
{
enum lsa_SidType type;
uint32 rid;
@@ -1246,7 +1246,7 @@ done:
Group mapping is used for gids that maps to Wellknown SIDs
*****************************************************************/
-BOOL legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
+static BOOL legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
{
uint32 rid;
GROUP_MAP map;
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 7765eb3c20..dfa039a739 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1,7 +1,7 @@
/*
Unix SMB/CIFS implementation.
LDAP protocol helper functions for SAMBA
- Copyright (C) Jean François Micouleau 1998
+ Copyright (C) Jean François Micouleau 1998
Copyright (C) Gerald Carter 2001-2003
Copyright (C) Shahms King 2001
Copyright (C) Andrew Bartlett 2002-2003
@@ -455,7 +455,11 @@ static time_t ldapsam_get_entry_timestamp( struct ldapsam_privates *ldap_state,
temp))
return (time_t) 0;
- strptime(temp, "%Y%m%d%H%M%SZ", &tm);
+ if ( !strptime(temp, "%Y%m%d%H%M%SZ", &tm)) {
+ DEBUG(2,("ldapsam_get_entry_timestamp: strptime failed on: %s\n",
+ (char*)temp));
+ return (time_t) 0;
+ }
tzset();
return timegm(&tm);
}