Index: /trunk/src/mailman.sub.c
===================================================================
--- /trunk/src/mailman.sub.c	(revision 1210)
+++ /trunk/src/mailman.sub.c	(revision 1210)
@@ -0,0 +1,50 @@
+/*
+ $Id$
+ ----------------------------------------------------------------------
+ AlternC - Web Hosting System
+ Copyright (C) 2004 by the AlternC Development Team.
+ http://alternc.org/
+ ----------------------------------------------------------------------
+ Based on:
+ Valentin Lacambre's web hosting softwares: http://altern.org/
+ ----------------------------------------------------------------------
+ LICENSE
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License (GPL)
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ To read the license please visit http://www.gnu.org/copyleft/gpl.html
+ ----------------------------------------------------------------------
+ Original Author of file: Benjamin Sonntag - 2003-01-19
+ Purpose of file: Subscribe a user to a mailing list
+ ----------------------------------------------------------------------
+*/
+/* setgid() */
+#include <sys/types.h>
+#include <unistd.h>
+/* printf() perror() */
+#include <stdio.h>
+
+#define M_PATH "/usr/lib/mailman/bin/add_members"
+
+int main(int argc,char *argv[]) {
+  if (argc!=2) {
+    printf("Utilisation : echo <user> | mailman.sub <list>\n\n");
+    exit(-1);
+  }
+  
+  //  setuid(geteuid());
+  setgid(getegid());
+
+  // WARNING : LIST ZONE //
+  execl(M_PATH, M_PATH, "-r", "-", "-w", "n", argv[1], argv[2], 0);
+
+  perror("exec failed");
+}
Index: /trunk/src/mailman.unsub.c
===================================================================
--- /trunk/src/mailman.unsub.c	(revision 1210)
+++ /trunk/src/mailman.unsub.c	(revision 1210)
@@ -0,0 +1,50 @@
+/*
+ $Id$
+ ----------------------------------------------------------------------
+ AlternC - Web Hosting System
+ Copyright (C) 2004 by the AlternC Development Team.
+ http://alternc.org/
+ ----------------------------------------------------------------------
+ Based on:
+ Valentin Lacambre's web hosting softwares: http://altern.org/
+ ----------------------------------------------------------------------
+ LICENSE
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License (GPL)
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ To read the license please visit http://www.gnu.org/copyleft/gpl.html
+ ----------------------------------------------------------------------
+ Original Author of file: Benjamin Sonntag - 2003-01-19
+ Purpose of file: Subscribe a user to a mailing list
+ ----------------------------------------------------------------------
+*/
+/* setgid() */
+#include <sys/types.h>
+#include <unistd.h>
+/* printf() perror() */
+#include <stdio.h>
+
+#define M_PATH "/usr/lib/mailman/bin/remove_members"
+
+int main(int argc,char *argv[]) {
+  if (argc!=3) {
+    printf("Utilisation : mailman.unsub <list> <email>\n\n");
+    exit(-1);
+  }
+  
+  //  setuid(geteuid());
+  setgid(getegid());
+
+  // WARNING : LIST ZONE //
+  execl(M_PATH, M_PATH, "-n", "-N", argv[1], argv[2], 0);
+  perror("exec failed");
+
+}
Index: /trunk/src/Makefile
===================================================================
--- /trunk/src/Makefile	(revision 1190)
+++ /trunk/src/Makefile	(revision 1210)
@@ -27,6 +27,7 @@
 #
 CC=gcc
+PROGS=mailman.create mailman.delete mailman.list mailman.sub mailman.unsub
 
-all: mailman.create mailman.delete mailman.list
+all: ${PROGS}
 
 %: %.c
@@ -34,9 +35,9 @@
 
 clean: 
-	rm -f *.o core *~ mailman.delete mailman.create mailman.list
+	rm -f *.o core *~ ${PROGS}
 
 install:
-	chown list.list mailman.create mailman.delete mailman.list
-	chmod u+s mailman.create mailman.delete mailman.list
+	chown list.list ${PROGS}
+	chmod u+s ${PROGS}
 
 
