dovecot-2.0: lib-master: Use t_abspath() to resolve relative pat...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Dec 16 20:22:40 EET 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/876990dc41c2
changeset: 10499:876990dc41c2
user: Timo Sirainen <tss at iki.fi>
date: Wed Dec 16 13:22:32 2009 -0500
description:
lib-master: Use t_abspath() to resolve relative path, not realpath().
diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
src/lib-master/master-service-settings.c | 6 ++----
diffs (29 lines):
diff -r 569206178c09 -r 876990dc41c2 src/lib-master/master-service-settings.c
--- a/src/lib-master/master-service-settings.c Tue Dec 15 20:28:14 2009 -0500
+++ b/src/lib-master/master-service-settings.c Wed Dec 16 13:22:32 2009 -0500
@@ -2,6 +2,7 @@
#include "lib.h"
#include "array.h"
+#include "abspath.h"
#include "istream.h"
#include "write-full.h"
#include "str.h"
@@ -61,16 +62,13 @@ master_service_exec_config(struct master
master_service_exec_config(struct master_service *service, bool preserve_home)
{
const char **conf_argv, *path, *const *paths, *binary_path;
- char full_path[PATH_MAX];
binary_path = service->argv[0];
if (*service->argv[0] == '/') {
/* already have the path */
} else if (strchr(service->argv[0], '/') != NULL) {
/* relative to current directory */
- if (realpath(service->argv[0], full_path) == NULL)
- i_fatal("realpath(%s) failed: %m", service->argv[0]);
- binary_path = full_path;
+ binary_path = t_abspath(service->argv[0]);
} else if ((path = getenv("PATH")) != NULL) {
/* we have to find our executable from path */
paths = t_strsplit(path, ":");
More information about the dovecot-cvs
mailing list