diff options
author | Andrew Bartlett <abartlet@samba.org> | 2001-09-19 08:21:12 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2001-09-19 08:21:12 +0000 |
commit | 03b0f3b106df56c76f7fe77e4431954fd6d41e1a (patch) | |
tree | 0727b2e504095049df4b32f122543558d33f8d27 /source3/passdb | |
parent | 79a9902d39859e0b0dc9d375ffc7714faf00bbb1 (diff) | |
download | samba-03b0f3b106df56c76f7fe77e4431954fd6d41e1a.tar.gz samba-03b0f3b106df56c76f7fe77e4431954fd6d41e1a.tar.bz2 samba-03b0f3b106df56c76f7fe77e4431954fd6d41e1a.zip |
Use lp_private_dir() not magic on the lp_smb_passwd_file() output.
(This used to be commit 65ae05ce638f0d12e6f1e2a6f337c53c5c0a4f3a)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/machine_sid.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c index 34b0c74208..859f00b4c6 100644 --- a/source3/passdb/machine_sid.c +++ b/source3/passdb/machine_sid.c @@ -61,7 +61,6 @@ static BOOL read_sid_from_file(int fd, char *sid_file) BOOL pdb_generate_sam_sid(void) { int fd; - char *p; pstring sid_file; fstring sid_string; SMB_STRUCT_STAT st; @@ -69,11 +68,7 @@ BOOL pdb_generate_sam_sid(void) generate_wellknown_sids(); - pstrcpy(sid_file, lp_smb_passwd_file()); - p = strrchr_m(sid_file, '/'); - if(p != NULL) { - *++p = '\0'; - } + pstrcpy(sid_file, lp_private_dir()); if (!directory_exist(sid_file, NULL)) { if (mkdir(sid_file, 0700) != 0) { @@ -83,7 +78,7 @@ BOOL pdb_generate_sam_sid(void) } } - pstrcat(sid_file, "MACHINE.SID"); + pstrcat(sid_file, "/MACHINE.SID"); if((fd = sys_open(sid_file, O_RDWR | O_CREAT, 0644)) == -1) { DEBUG(0,("unable to open or create file %s. Error was %s\n", |