summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-01-08 14:21:23 +0100
committerAndrew Bartlett <abartlet@samba.org>2013-01-09 09:11:20 +0100
commit1aa0503401d41fec48d4d4e30d8bbcbd847ff807 (patch)
tree6bd90a1f53bb28aad3f00a7e99cb6ef8abc1723f /source4/winbind
parent6039388fc1f3671bb60db06211814f7edfc62285 (diff)
downloadsamba-1aa0503401d41fec48d4d4e30d8bbcbd847ff807.tar.gz
samba-1aa0503401d41fec48d4d4e30d8bbcbd847ff807.tar.bz2
samba-1aa0503401d41fec48d4d4e30d8bbcbd847ff807.zip
Use the new directory_create_or_exist_strict() function.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index a904470e19..f0367498a3 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -199,6 +199,7 @@ static void winbind_task_init(struct task_server *task)
struct wbsrv_listen_socket *listen_socket;
char *errstring;
struct dom_sid *primary_sid;
+ bool ok;
task_server_set_title(task, "task[winbind]");
@@ -213,14 +214,18 @@ static void winbind_task_init(struct task_server *task)
}
/* Make sure the directory for the Samba3 socket exists, and is of the correct permissions */
- if (!directory_create_or_exist(lpcfg_winbindd_socket_directory(task->lp_ctx), geteuid(), 0755)) {
+ ok = directory_create_or_exist_strict(lpcfg_winbindd_socket_directory(task->lp_ctx),
+ geteuid(), 0755);
+ if (!ok) {
task_server_terminate(task,
"Cannot create winbindd pipe directory", true);
return;
}
/* Make sure the directory for the Samba3 socket exists, and is of the correct permissions */
- if (!directory_create_or_exist(lpcfg_winbindd_privileged_socket_directory(task->lp_ctx), geteuid(), 0750)) {
+ ok = directory_create_or_exist_strict(lpcfg_winbindd_privileged_socket_directory(task->lp_ctx),
+ geteuid(), 0750);
+ if (!ok) {
task_server_terminate(task,
"Cannot create winbindd privileged pipe directory", true);
return;