From 03b0f3b106df56c76f7fe77e4431954fd6d41e1a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 19 Sep 2001 08:21:12 +0000 Subject: Use lp_private_dir() not magic on the lp_smb_passwd_file() output. (This used to be commit 65ae05ce638f0d12e6f1e2a6f337c53c5c0a4f3a) --- source3/passdb/machine_sid.c | 9 ++------- 1 file 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", -- cgit