OSSP CVS Repository

ossp - Check-in [274]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 274
Date: 2001-Jan-15 17:55:45 (local)
2001-Jan-15 16:55:45 (UTC)
User:simons
Branch:
Comment: List's "AllowPublicSubscripiton" does not exist anymore. Now we have "SubscriptionType" with valid values "public", "admin" or "acknowledged".
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/config.c      1.13 -> 1.14     16 inserted, 5 deleted
ossp-pkg/petidomo/config/list-config      1.4 -> 1.5     16 inserted, 8 deleted
ossp-pkg/petidomo/petidomo.h      1.9 -> 1.10     13 inserted, 4 deleted
ossp-pkg/petidomo/subscribe.c      1.9 -> 1.10     2 inserted, 2 deleted
ossp-pkg/petidomo/unsubscribe.c      1.9 -> 1.10     2 inserted, 2 deleted

ossp-pkg/petidomo/config.c 1.13 -> 1.14

--- config.c     2001/01/15 16:35:06     1.13
+++ config.c     2001/01/15 16:55:45     1.14
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/Attic/config.c,v $
-   $Revision: 1.13 $
+   $Revision: 1.14 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -136,7 +136,7 @@
 static char*     reply_to;
 static char*     postingfilter;
 static char*     archivepath;
-static bool      allowpubsub;
+static char*     subtype;
 static bool      allowmembers;
 static char*     intro_file;
 static char*     sig_file;
@@ -161,7 +161,7 @@
     struct ConfigFile ListCF[] =
         {
         { "ListType", CF_STRING, &listtype },
-        { "AllowPublicSubscription", CF_YES_NO, &allowpubsub },
+        { "SubscriptionType", CF_STRING, &subtype },
         { "AllowMembersCommand", CF_YES_NO, &allowmembers },
         { "ReplyTo", CF_STRING, &reply_to },
         { "Hostname", CF_STRING, &list_fqdn },
@@ -188,7 +188,7 @@
     reply_to         = NULL;
     postingfilter    = NULL;
     archivepath      = NULL;
-    allowpubsub      = TRUE;
+    subtype          = NULL;
     allowmembers     = FALSE;
     intro_file       = "introduction";
     sig_file         = "signature";
@@ -252,12 +252,23 @@
         ListConfig->listtype = LIST_CLOSED;
     else if (!strcasecmp(listtype, "moderated"))
         ListConfig->listtype = LIST_MODERATED;
+    else if (!strcasecmp(listtype, "acknowledged") || !strcasecmp(listtype, "acked"))
+        ListConfig->listtype = LIST_ACKED;
+    else if (!strcasecmp(listtype, "acknowledged-once") || !strcasecmp(listtype, "acked-once"))
+        ListConfig->listtype = LIST_ACKED_ONCE;
     else
         {
         syslog(LOG_ERR, "List \"%s\" doesn't have a valid type in config file.", listname);
         exit(1);
         }
-    ListConfig->allowpubsub = allowpubsub;
+
+    if (!strcasecmp(subtype, "public"))
+        ListConfig->listtype = SUBSCRIPTION_PUBLIC;
+    else if (!strcasecmp(subtype, "admin"))
+        ListConfig->listtype = SUBSCRIPTION_ADMIN;
+    else if (!strcasecmp(subtype, "acknowledged") || !strcasecmp(subtype, "acked"))
+        ListConfig->listtype = SUBSCRIPTION_ACKED;
+
     ListConfig->allowmembers = allowmembers;
     ListConfig->fqdn = (list_fqdn) ? list_fqdn : MasterConfig->fqdn;
     ListConfig->reply_to = reply_to;


ossp-pkg/petidomo/config/list-config 1.4 -> 1.5

--- list-config  2001/01/15 16:36:11     1.4
+++ list-config  2001/01/15 16:55:45     1.5
@@ -1,29 +1,37 @@
 #
-# $Header: /v/ossp/cvs/ossp-pkg/petidomo/config/list-config,v 1.4 2001/01/15 16:36:11 simons Exp $
+# $Header: /v/ossp/cvs/ossp-pkg/petidomo/config/list-config,v 1.5 2001/01/15 16:55:45 simons Exp $
 #
 
-#  TAG: ListType <open|closed|moderated>
-#       The following types of mailing lists exists and one of them
-#       should be specified here:
+#  TAG: ListType <open|closed|moderated|acknowledged|acknowledged-once>
+#       The following types of mailing lists exists:
 #
 #         open -- The list is open for all postings which are not rejected
 #               due to the access control mechanism.
 #         closed -- Only subscribers are allowed to post.
 #         moderated -- Only postings which contain the correct posting
 #               password are allowed.
+#         acknowledged -- Every attempt to post will be answered with
+#               a request for acknowledgment, asking the poster to
+#               confirm. This prevents abuse and forgery.
+#         acknowledged-once -- A fist-time poster will have to
+#               acknowledge his posting once, after that, he can post
+#               as he wishes.
 #
 #       This option is REQUIRED. Petidomo will abort with an error, if it is
 #       unset.
 ListType        open
 
-#  TAG: AllowPublicSubscription <yes|no>
-#         yes -- Everybody can subscribe and unsubscribe.
-#         no  -- Un-/subscription can only be done by the admin.
+#  TAG: SubscriptionType <public|admin|acknowledged>
+#         public -- Everybody can subscribe and unsubscribe.
+#         admin  -- Un-/subscription can only be done by the admin.
 #               Authenticiation is done via password mechanism.
+#         acknowledged -- Anybody can un-/subscribe, but he has to
+#               acknowledge the request sent to the address add to or
+#               deleted from the list.
 #
 #       The default, if this option is unset, is to allow public
 #       subscription and unsubscription.
-AllowPublicSubscription yes
+SubscriptionType        public
 
 #  TAG: AllowMembersCommand <yes|no>
 #       Does the 'members' or 'who' command work for this mailing list, or


ossp-pkg/petidomo/petidomo.h 1.9 -> 1.10

--- petidomo.h   2001/01/15 16:35:06     1.9
+++ petidomo.h   2001/01/15 16:55:45     1.10
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/petidomo.h,v $
-   $Revision: 1.9 $
+   $Revision: 1.10 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -63,17 +63,26 @@
     char *    index_file;
     };
 
-enum
+enum list_type_t
     {
     LIST_OPEN,
     LIST_CLOSED,
-    LIST_MODERATED
+    LIST_MODERATED,
+    LIST_ACKED,
+    LIST_ACKED_ONCE
+    };
+
+enum subscription_type_t
+    {
+    SUBSCRIPTION_PUBLIC,
+    SUBSCRIPTION_ADMIN,
+    SUBSCRIPTION_ACKED
     };
 
 struct List_Config
     {
     unsigned int  listtype;
-    int           allowpubsub;
+    unsigned int  subtype;
     int           allowmembers;
     char *        fqdn;
     char *        admin_password;


ossp-pkg/petidomo/subscribe.c 1.9 -> 1.10

--- subscribe.c  2001/01/15 16:35:06     1.9
+++ subscribe.c  2001/01/15 16:55:45     1.10
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v $
-   $Revision: 1.9 $
+   $Revision: 1.10 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -113,7 +113,7 @@
         {
         /* No valid password, check further. */
 
-        if (ListConfig->allowpubsub == FALSE)
+        if (ListConfig->subtype == SUBSCRIPTION_ADMIN)
             {
             /* Access was unauthorized, notify the originator. */
 


ossp-pkg/petidomo/unsubscribe.c 1.9 -> 1.10

--- unsubscribe.c        2001/01/15 16:35:07     1.9
+++ unsubscribe.c        2001/01/15 16:55:45     1.10
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v $
-   $Revision: 1.9 $
+   $Revision: 1.10 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -114,7 +114,7 @@
         {
         /* No valid password, check further. */
 
-        if (ListConfig->allowpubsub == FALSE)
+        if (ListConfig->subtype == SUBSCRIPTION_ADMIN)
             {
             /* Access was unauthorized, notify the originator. */
 

CVSTrac 2.0.1