git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dd1350
)
s3-registry: Fix counters_directory() dir creation.
author
Andreas Schneider
<asn@samba.org>
Mon, 10 Dec 2012 16:45:15 +0000
(17:45 +0100)
committer
Günther Deschner
<gd@samba.org>
Wed, 12 Dec 2012 14:00:02 +0000
(15:00 +0100)
Found by Coverity.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/registry/reg_perfcount.c
patch
|
blob
|
history
diff --git
a/source3/registry/reg_perfcount.c
b/source3/registry/reg_perfcount.c
index e51d3743208a43eda9da745f8be0b663fc4dc545..cfefb1fb95155dd84efa6e281740310cd55f52c5 100644
(file)
--- a/
source3/registry/reg_perfcount.c
+++ b/
source3/registry/reg_perfcount.c
@@
-48,8
+48,8
@@
static char *counters_directory(const char *dbname)
TALLOC_CTX *ctx = talloc_tos();
path = state_path(PERFCOUNTDIR);
- if (!directory_
exist(path
)) {
-
mkdir(path, 0755)
;
+ if (!directory_
create_or_exist(path, geteuid(), 0755
)) {
+
return NULL
;
}
path = talloc_asprintf(ctx, "%s/%s", PERFCOUNTDIR, dbname);