aboutsummaryrefslogtreecommitdiff
path: root/src/stat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@Pirx.gnu.org.ua>2009-04-27 17:23:50 +0300
committerSergey Poznyakoff <gray@Pirx.gnu.org.ua>2009-04-27 17:23:50 +0300
commit4d22b4e8668cc717440d66120b8607be9a273c97 (patch)
tree93b4addac108a1c8e913f0d5c68cb513f5c82c31 /src/stat.c
parentfe8f5226e8bc39bdc75e40e1c1ea464e9fc60ad3 (diff)
downloadtagr-4d22b4e8668cc717440d66120b8607be9a273c97.tar.gz
tagr-4d22b4e8668cc717440d66120b8607be9a273c97.tar.bz2
Bugfixes.
* src/main.c (change_user): Bugfix (main): Reset user to the value of user_option, if set. Fix (again) log_to_stderr initialization. Switch to user privileges before actually performing any actions that modify the database and other output files. * src/report.c (open_db): Don't exit if unable to open database. Return 1 instead. All callers updated. * src/tagr.h (open_db): Update prototype.
Diffstat (limited to 'src/stat.c')
-rw-r--r--src/stat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stat.c b/src/stat.c
index 85b76d9..813c5cb 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -428,3 +428,4 @@ import (const char *dirname)
{
- open_db (TAGR_DB_WR);
+ if (open_db (TAGR_DB_WR))
+ exit (EX_UNAVAILABLE);
if (import_log (dirname) == 0)
@@ -447,3 +448,4 @@ import (const char *dirname)
case 0:
- open_db (TAGR_DB_WR);
+ if (open_db (TAGR_DB_WR))
+ exit (EX_UNAVAILABLE);
for (i = 0; i < gl.gl_pathc; i++)

Return to:

Send suggestions and report system problems to the System administrator.