* precalculate the position of chkpwd like we do it for the rest.
authorWilfried Göesgens <willi@citadel.org>
Wed, 24 Jan 2007 22:36:12 +0000 (22:36 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 24 Jan 2007 22:36:12 +0000 (22:36 +0000)
citadel/citadel_dirs.c
citadel/citadel_dirs.h
citadel/user_ops.c

index 4c2170eb256b51172e611932a920f852653859db..32ddc75e38983152f2520aef7986a002856485a9 100644 (file)
@@ -60,6 +60,7 @@ char file_pid_file[PATH_MAX]="";
 char file_crpt_file_key[PATH_MAX]="";
 char file_crpt_file_csr[PATH_MAX]="";
 char file_crpt_file_cer[PATH_MAX]="";
+char file_chkpwd[PATH_MAX]="";
 
 int home_specified = 0;
 
@@ -194,6 +195,11 @@ void calc_dirs_n_files(int relh, int home, const char *relhome,const char  *ctdl
                 sizeof file_crpt_file_cer, 
                 "%scitadel.cer",
                 ctdl_key_dir);
+
+       snprintf(file_chkpwd,
+                sizeof file_chkpwd, 
+                "%schkpwd",
+                ctdl_sbin_dir);
        /* 
         * DIRTY HACK FOLLOWS! due to configs in the network dir in the 
         * legacy installations, we need to calculate ifdeffed here.
index 960a1e8c867fdbbadf514f544b0ee6000722b7c8..15d6a8a39a2982772a621c28fc416d402de415cd 100644 (file)
@@ -44,7 +44,7 @@ extern char file_pid_file[PATH_MAX];
 extern char file_crpt_file_key[PATH_MAX];
 extern char file_crpt_file_csr[PATH_MAX];
 extern char file_crpt_file_cer[PATH_MAX];
-
+extern char file_chkpwd[PATH_MAX];
 
 extern void calc_dirs_n_files(int relh, int home, const char *relhome,const char  *ctdldir);
 
index 13e8db773c040a51bbc0c0abf675b325bee75a76..4b23c646fa0284cdea803291a9bc16b49265ca6b 100644 (file)
@@ -47,6 +47,7 @@
 #include "config.h"
 #include "tools.h"
 #include "citserver.h"
+#include "citadel_dirs.h"
 #include "genstamp.h"
 
 /*
@@ -608,8 +609,8 @@ static int validpw(uid_t uid, const char *pass)
                }
                close(pipev[0]);
 
-               execl(CTDLDIR "/chkpwd", CTDLDIR "/chkpwd", NULL);
-               perror(CTDLDIR "/chkpwd");
+               execl(file_chkpwd, file_chkpwd, NULL);
+               perror(file_chkpwd);
                exit(1);
        }