summaryrefslogtreecommitdiff
path: root/source3/passdb/smbpass.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-05-18 11:54:00 +0000
committerLuke Leighton <lkcl@samba.org>1998-05-18 11:54:00 +0000
commit32954eb9e9eb1e3613ad55cb1afd5e19e81b5da8 (patch)
tree11d821038aec3d384ed8d17607c32d412aa28d9a /source3/passdb/smbpass.c
parent94a39bd9a2bfd3c87596cc1311860b7f840b1634 (diff)
downloadsamba-32954eb9e9eb1e3613ad55cb1afd5e19e81b5da8.tar.gz
samba-32954eb9e9eb1e3613ad55cb1afd5e19e81b5da8.tar.bz2
samba-32954eb9e9eb1e3613ad55cb1afd5e19e81b5da8.zip
Makefile:
- added nisppass.c and NISPLUS_FLAGS includes.h: - renamed USE_LDAP to USE_LDAP_DB. renamed NISPLUS to USE_NISPLUS_DB. added default define of USE_SMBPASS_DB. - removed ldap headers: they are local only to ldap.c ldap.c : - made all ldap-specific functions static. - added dummy sam21 functions loadparm.c : - renamed NISPLUS to NISPLUS_HOME mkproto.awk - commented out ldap-specific #ifdef generation code: it's not needed now that ldap-specific functions in ldap.c are static nisppass.c : - first attempt at an add function from (This used to be commit f215d375f0f1e12894c2a9e86bd28d4776d337c1)
Diffstat (limited to 'source3/passdb/smbpass.c')
-rw-r--r--source3/passdb/smbpass.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index 3b93b28a1e..faaf9c5ccb 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -416,7 +416,7 @@ struct smb_passwd *getsmbpwent(void *vp)
pw_buf.smb_passwd = NULL;
pw_buf.acct_ctrl |= ACB_PWNOTREQ;
} else {
- if (!gethexpwd((char *)p, (char *)smbpwd)) {
+ if (!pdb_gethexpwd((char *)p, (char *)smbpwd)) {
DEBUG(0, ("getsmbpwent: Malformed Lanman password entry (non hex chars)\n"));
continue;
}
@@ -433,7 +433,7 @@ struct smb_passwd *getsmbpwent(void *vp)
the lanman password. */
if ((linebuf_len >= (PTR_DIFF(p, linebuf) + 33)) && (p[32] == ':')) {
if (*p != '*' && *p != 'X') {
- if(gethexpwd((char *)p,(char *)smbntpwd))
+ if(pdb_gethexpwd((char *)p,(char *)smbntpwd))
pw_buf.smb_nt_passwd = smbntpwd;
}
p += 33; /* Move to the first character of the line after
@@ -523,6 +523,17 @@ BOOL setsmbpwpos(void *vp, unsigned long tok)
do not call this function directly. use passdb.c instead.
*************************************************************************/
+BOOL add_smb21pwd_entry(struct sam_passwd *newpwd)
+{
+ return False;
+}
+
+/************************************************************************
+ Routine to add an entry to the smbpasswd file.
+
+ do not call this function directly. use passdb.c instead.
+
+*************************************************************************/
BOOL add_smbpwd_entry(struct smb_passwd *newpwd)
{
char *pfile = lp_smb_passwd_file();
@@ -657,6 +668,22 @@ Error was %s. Password file may be corrupt ! Please examine by hand !\n",
do not call this function directly. use passdb.c instead.
************************************************************************/
+BOOL mod_smb21pwd_entry(struct sam_passwd* pwd, BOOL override)
+{
+ return False;
+}
+
+/************************************************************************
+ Routine to search the smbpasswd file for an entry matching the username.
+ and then modify its password entry. We can't use the startsmbpwent()/
+ getsmbpwent()/endsmbpwent() interfaces here as we depend on looking
+ in the actual file to decide how much room we have to write data.
+ override = False, normal
+ override = True, override XXXXXXXX'd out password or NO PASS
+
+ do not call this function directly. use passdb.c instead.
+
+************************************************************************/
BOOL mod_smbpwd_entry(struct smb_passwd* pwd, BOOL override)
{
/* Static buffers we will return. */
@@ -1140,7 +1167,7 @@ BOOL get_trust_account_password( unsigned char *ret_pwd, time_t *pass_last_set_t
* Get the hex password.
*/
- if (!gethexpwd((char *)linebuf, (char *)ret_pwd) || linebuf[32] != ':' ||
+ if (!pdb_gethexpwd((char *)linebuf, (char *)ret_pwd) || linebuf[32] != ':' ||
strncmp(&linebuf[33], "TLC-", 4)) {
DEBUG(0,("get_trust_account_password: Malformed trust password file (incorrect format).\n"));
#ifdef DEBUG_PASSWORD