aboutsummaryrefslogtreecommitdiff
path: root/src/gpg.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-08-20 13:54:40 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-08-20 13:54:40 +0000
commit5d2f6b08d164d0106ef2377ceb01393226eeafef (patch)
tree3939f57e0aeba6dadca64eaf400ae42873a4fd6f /src/gpg.c
parent39a9fb6ab567b48ac8c38b98143d6089e9d16709 (diff)
downloadwydawca-5d2f6b08d164d0106ef2377ceb01393226eeafef.tar.gz
wydawca-5d2f6b08d164d0106ef2377ceb01393226eeafef.tar.bz2
* jabberd/Makefile.am, cvs/Makefile.am, ckaliases/Makefile.am,
acinclude.m4, Makefile.am: Add copyright statements * wydawca/sql.c (trim_length): Move to verify.c * wydawca/verify.c (trim_length, trim) (check_access_rights): New functions (expand_param): Export (verify_triplet): Call verify_directive_format and check_access_rights * wydawca/wydawca.h (trim_length, trim, directive_parse) (directive_get_value, directive_pack_version) (directive_version_in_range_p, verify_directive_format) (directive_first, directive_next, process_directives) (create_directory, move_file): New functions (MIN_DIRECTIVE_VERSION,MAX_DIRECTIVE_VERSION) (MKDIR_PERMISSIONS,CREAT_PERMISSIONS): New defines * wydawca/gpg.c (wydawca_gpg_homedir): Return a meaningful value (verify_directive_signature): Call directive_parse * wydawca/process.c (parse_file_name): Return void * wydawca/directive.c: New file * wydawca/diskio.c: New file * wydawca/triplet.c (triplet_processor): Call process_directives (enumerate_triplets): Arg is not const * wydawca/Makefile.am: Add new sources * configure.ac: Check for sendfile git-svn-id: file:///svnroot/wydawca/trunk@281 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
Diffstat (limited to 'src/gpg.c')
-rw-r--r--src/gpg.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/gpg.c b/src/gpg.c
index a722b4e..a327f4c 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -128,3 +128,3 @@ wydawca_gpg_homedir ()
if (homedir)
- return;
+ return 0;
@@ -141,2 +141,3 @@ wydawca_gpg_homedir ()
setenv ("GNUPGHOME", homedir, 1);
+ return 0;
}
@@ -166,7 +167,2 @@ verify_directive_signature (struct file_register *reg,
{
- size_t dcount, i;
- char *p;
-
- rc = 0;
-
size = gpgme_data_seek (plain, 0, SEEK_END);
@@ -177,19 +173,4 @@ verify_directive_signature (struct file_register *reg,
gpgme_data_release (plain);
-
- dcount = 1;
- for (p = reg->blurb; *p; p++)
- if (*p == '\n')
- dcount++;
-
- reg->directive = xcalloc (dcount, sizeof reg->directive[0]);
- p = reg->blurb;
- for (i = 0; i < dcount; i++)
- {
- reg->directive[i] = p;
- p = strchr (p, '\n');
- if (!p)
- break;
- *p++ = 0;
- }
- reg->directive[i] = NULL;
+
+ rc = directive_parse (reg);
}
@@ -271,3 +252,2 @@ verify_detached_signature (struct file_register *reg,
gpgme_engine_info_t info;
- const char *gpg_prog;
char *argv[5];
@@ -333,5 +313,2 @@ verify_detached_signature (struct file_register *reg,
{
- size_t size = 0;
- char *buf = NULL;
-
logmsg (LOG_ERR, "bad detached signature for %s", reg->name);

Return to:

Send suggestions and report system problems to the System administrator.