git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88bef55
)
Ensure we're root before opening a printer backend tdb.
author
Jeremy Allison
<jra@samba.org>
Mon, 22 Jul 2002 19:32:13 +0000
(19:32 +0000)
committer
Jeremy Allison
<jra@samba.org>
Mon, 22 Jul 2002 19:32:13 +0000
(19:32 +0000)
Jeremy.
(This used to be commit
48ab4ae4221ed0be34c269e01a4e8b6bc93f87d7
)
source3/printing/printing.c
patch
|
blob
|
history
diff --git
a/source3/printing/printing.c
b/source3/printing/printing.c
index 9b0e8cdfb0aae849a759534f751a2874a401f591..3579ddd7a0d4cbd9e89be2c29558ccc47db891c7 100644
(file)
--- a/
source3/printing/printing.c
+++ b/
source3/printing/printing.c
@@
-188,7
+188,11
@@
static struct tdb_print_db *get_print_db_byname(const char *printername)
pstrcpy(printdb_path, lock_path("printing/"));
pstrcat(printdb_path, printername);
pstrcat(printdb_path, ".tdb");
+
+ become_root();
p->tdb = tdb_open_log(printdb_path, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+ unbecome_root();
+
if (!p->tdb) {
DEBUG(0,("get_print_db: Failed to open printer backend database %s.\n",
printdb_path ));