summaryrefslogtreecommitdiffabout
path: root/tests
authorSergey Poznyakoff <gray@gnu.org.ua>2009-11-30 19:35:14 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-11-30 19:35:14 (GMT)
commita4b8dfab94b3ca44b6e3aecd7c0281ca2f5b51d5 (patch) (side-by-side diff)
tree531d41fe7bb4adfba62024e6205cbfa742f7e70e /tests
parent4c68f93c0c664e13a8572b43e33c138ce3bb8d28 (diff)
downloadwydawca-a4b8dfab94b3ca44b6e3aecd7c0281ca2f5b51d5.tar.gz
wydawca-a4b8dfab94b3ca44b6e3aecd7c0281ca2f5b51d5.tar.bz2
Do not require uploaders to be present in the system passwd database.
* src/wydawca.h (access_method_id): Remove verify_method, gpg_key_method and user_data_method. Add project_uploader_method. (uploader_info): New structure. (struct file_triplet): Remove gid and user data fields. Add uploader_count, uploader_list and uploader. (TRIPLET_GID): Change definition. (verify_directive_signature): Change signature. (uploader_find_frp): New proto. * src/verify.c (extract_plaintext): New function. (fill_project_name): Rewrite. Parse directive file. (uploader_find_frp): New function. (check_access_rights): Remove. (verify_directive_file): Rewrite. * src/config.c (string_to_access_method_id): Reflect changes to the access method system. * src/builtin.c (default_ncol): Reflect changes to the access method system. * src/gpg.c (gpg_sig_ok_p): Remove. (gpg_verify_signature): New function, based on gpg_sig_ok_p. (verify_directive_signature): Remove `pubkey' argument. Register all public keys from the uploader list. Do not call directive_parse, as the directive file must already be parsed by the time the function is called. * src/mail.c (get_uploader_email): New function. (do_notify): Use get_uploader_email for notifying users. * src/triplet.c (hash_triplet_free): Reflect changes to the triplet structure. (format_file_data): Get user name from the system passwd database. (fill_user_data): Remove. (expand_user_real_name, expand_user_email): Reflect changes to struct file_triplet. * tests/etc/wydawca.rcin: Rewrite to reflect new access method system. * tests/mailstats.at, tests/notify-upl.at, tests/upload-dry.at, tests/upload.at: Update.
Diffstat (limited to 'tests') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/etc/wydawca.rcin20
-rw-r--r--tests/mailstats.at1
-rw-r--r--tests/notify-upl.at1
-rw-r--r--tests/upload-dry.at2
-rw-r--r--tests/upload.at1
5 files changed, 3 insertions, 22 deletions
diff --git a/tests/etc/wydawca.rcin b/tests/etc/wydawca.rcin
index bc6aaa4..2ac40e9 100644
--- a/tests/etc/wydawca.rcin
+++ b/tests/etc/wydawca.rcin
@@ -27,25 +27,11 @@ access-method project-owner {
"proj", "proj-owner@localhost", "Project Admin");
}
-access-method user-data {
+access-method project-uploader {
type builtin;
- query "${user}";
- params ("/exact",
- "@USER@", "@USER@@localhost", "Wydawca Test User");
-}
-
-access-method verify-user {
- type builtin;
- query "${user}";
- params ("/exact",
- "@USER@", "@USER@");
-}
-
-access-method gpg-key {
- type builtin;
- query "${user}";
+ query "${project}";
params ("/exact",
- "@USER@",
+ "proj", "gray", "Wydawca Test User", "gray@localhost",
"-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
"Version: GnuPG v1.4.7 (GNU/Linux)\n"
"\n"
diff --git a/tests/mailstats.at b/tests/mailstats.at
index 88e0aed..ff16f2a 100644
--- a/tests/mailstats.at
+++ b/tests/mailstats.at
@@ -18,7 +18,6 @@ AT_SETUP([Simple upload statistics])
AT_DATA([errtmpl],
[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
-wydawca: [[NOTICE]] no such group: proj
wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
wydawca: [[INFO]] errors: 0
wydawca: [[INFO]] warnings: 0
diff --git a/tests/notify-upl.at b/tests/notify-upl.at
index dc8b77a..9efe1d9 100644
--- a/tests/notify-upl.at
+++ b/tests/notify-upl.at
@@ -18,7 +18,6 @@ AT_SETUP([Simple upload and notification])
AT_DATA([errtmpl],
[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
-wydawca: [[NOTICE]] no such group: proj
wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
wydawca: [[INFO]] errors: 0
wydawca: [[INFO]] warnings: 0
diff --git a/tests/upload-dry.at b/tests/upload-dry.at
index 5f79fa8..a6317a2 100644
--- a/tests/upload-dry.at
+++ b/tests/upload-dry.at
@@ -26,8 +26,6 @@ wydawca: [[DEBUG]] processing spool test (@WD_DST@)
wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc
wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua>
wydawca: [[DEBUG]] file: directive file signature OK
-wydawca: [[NOTICE]] no such group: proj
-wydawca: [[DEBUG]] verifying access rights for user gray to project proj
wydawca: [[DEBUG]] processing triplet `file'
wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
wydawca: [[DEBUG]] good detached signature for file
diff --git a/tests/upload.at b/tests/upload.at
index 22e12fc..1968658 100644
--- a/tests/upload.at
+++ b/tests/upload.at
@@ -18,7 +18,6 @@ AT_SETUP([Simple upload])
AT_DATA([template],
[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
-wydawca: [[NOTICE]] no such group: proj
wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
wydawca: [[INFO]] errors: 0
wydawca: [[INFO]] warnings: 0

Return to:

Send suggestions and report system problems to the System administrator.