summaryrefslogtreecommitdiff
path: root/source3/passdb/smbpassfile.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-11-21 05:55:16 +0000
committerGerald Carter <jerry@samba.org>2000-11-21 05:55:16 +0000
commit0dcbafe2b97035df779f2e0742a130c4c79e3241 (patch)
tree0d556fda89c3ce7423430186618e71a5790c0359 /source3/passdb/smbpassfile.c
parent2130ced345a6f3ecffe61c3622aceb8986925baa (diff)
downloadsamba-0dcbafe2b97035df779f2e0742a130c4c79e3241.tar.gz
samba-0dcbafe2b97035df779f2e0742a130c4c79e3241.tar.bz2
samba-0dcbafe2b97035df779f2e0742a130c4c79e3241.zip
Another large patch for the passdb rewrite.
o added BOOL own_memory flag in SAM_ACCOUNT so we could use static memory for string pointer assignment or allocate a new string o added a reference TDB passdb backend. This is only a reference and should not be used in production because - RID's are generated using the same algorithm as with smbpasswd - a TDB can only have one key (w/o getting into problems) and we need three. Therefore the pdb_sam-getpwuid() and pdb_getsampwrid() functions are interative searches :-( we need transaction support, multiple indexes, and a nice open source DBM. The Berkeley DB (from sleepycat.com seems to fit this criteria now) o added a new parameter "private dir" as many places in the code were using lp_smb_passwd_file() and chopping off the filename part. This makes more sense to me and I will docuement it in the man pages o Ran through Insure-lite and corrected memory leaks. Need for a public flogging this time Jeremy (-: -- jerry (This used to be commit 4792029a2991bd84251d152a62b1033dec62cee2)
Diffstat (limited to 'source3/passdb/smbpassfile.c')
-rw-r--r--source3/passdb/smbpassfile.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/passdb/smbpassfile.c b/source3/passdb/smbpassfile.c
index 9087dcf0ea..72dcbea122 100644
--- a/source3/passdb/smbpassfile.c
+++ b/source3/passdb/smbpassfile.c
@@ -85,12 +85,10 @@ static BOOL pw_file_unlock(int fd, int *plock_depth)
static void get_trust_account_file_name( char *domain, char *name, char *mac_file)
{
unsigned int mac_file_len;
- char *p;
- pstrcpy(mac_file, lp_smb_passwd_file());
- p = strrchr(mac_file, '/');
- if(p != NULL)
- *++p = '\0';
+ pstrcpy(mac_file, lp_private_dir());
+ if (mac_file[strlen(mac_file)-1] != '/')
+ pstrcat (mac_file, "/");
mac_file_len = strlen(mac_file);