diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-23 00:41:54 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-23 00:41:54 +0200 |
commit | 7543ff5973d1afe75b0f4226a3a02cc8d375ad3e (patch) | |
tree | 27a8b45adacc99d929c12679512d9e8adf9b5500 /src/directive.c | |
parent | cc980787791b10c2a8e95e07d40973861e00a8d9 (diff) | |
download | wydawca-7543ff5973d1afe75b0f4226a3a02cc8d375ad3e.tar.gz wydawca-7543ff5973d1afe75b0f4226a3a02cc8d375ad3e.tar.bz2 |
Switch to user privileges while processing the triplet
Diffstat (limited to 'src/directive.c')
-rw-r--r-- | src/directive.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/directive.c b/src/directive.c index 654dc61..ff020ed 100644 --- a/src/directive.c +++ b/src/directive.c @@ -304,13 +304,13 @@ verify_directive_format (struct file_triplet *trp) int process_directives (struct file_triplet *trp, struct spool *spool) { - int n; + int rc, n; const char *key, *val; char *relative_dir; + UPDATE_STATS (STAT_COMPLETE_TRIPLETS); timer_start ("triplet"); report_init (); - UPDATE_STATS (STAT_COMPLETE_TRIPLETS); for (n = directive_first (trp, &key, &val); n; n = directive_next (trp, n, &key, &val)) { @@ -337,7 +337,10 @@ process_directives (struct file_triplet *trp, struct spool *spool) break; case filename_dir: - if (verify_detached_signature (trp, spool) == 0) + wydawca_uid (0); + rc = verify_detached_signature (trp, spool); + wydawca_uid (TRIPLET_UID (trp)); + if (rc == 0) { if (move_file (trp, spool, file_dist, relative_dir) || move_file (trp, spool, file_signature, relative_dir)) |