i've tried adding a new section to the network screen. as for webcit, that worked out... but i've got trouble getting citserver to work properly in all situations.

As far as i understood this, citserver stores a message of type x-config, that contains key value pairs with the domain type and the domain?

so there is no datastructure that needs to be modified that for?

but with that patch my installation, and fresh ones doing host based auth went instantly dead. What did i miss?

Also i got into trouble after it worked, that the citadel would take the real name of the user in /etc/passwd is taken as username, and i don't get the operator status...

Index: sysdep.c
===================================================================
--- sysdep.c	(revision 5134)
+++ sysdep.c	(working copy)
@@ -1013,6 +1013,8 @@
 		lprintf(CTDL_ALERT, "Can't create thread: %s\n", strerror(ret));
 	}
 
+	lprintf(CTDL_NOTICE, "Spawned indexer (%ld) and checkpoint (%ld) thread. ", 
+		indexer_thread_tid, checkpoint_thread_tid);
 	pthread_attr_destroy(&attr);
 }
 
Index: configure.ac
===================================================================
--- configure.ac	(revision 5134)
+++ configure.ac	(working copy)
@@ -609,17 +609,22 @@
 	AC_DEFINE(HAVE_UT_TYPE)
 fi
 
-AC_CACHE_CHECK([for call semantics from getpwuid_r], ac_cv_call_getpwuid_r,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <pwd.h>], [
-  struct passwd pw, *pwp;
-  char pwbuf[64];
-  uid_t uid;
+AC_CACHE_CHECK(
+	[for call semantics from getpwuid_r], 
+	ac_cv_call_getpwuid_r,
+	[AC_TRY_COMPILE([#include <sys/types.h>
+#include <pwd.h>], 
+                         [
+				struct passwd pw, *pwp;
+				char pwbuf[64];
+				uid_t uid;
 
-  getpwuid_r(uid, &pw, pwbuf, sizeof(pwbuf), &pwp);
+				getpwuid_r(uid, &pw, pwbuf, sizeof(pwbuf), &pwp);
+			],
+			ac_cv_call_getpwuid_r=yes, 
+			ac_cv_call_getpwuid_r=no)
+	])
 
-],
-ac_cv_call_getpwuid_r=yes, ac_cv_call_getpwuid_r=no)])
 if test $ac_cv_call_getpwuid_r = no; then
 	AC_DEFINE(SOLARIS_GETPWUID)
 	AC_DEFINE(F_UID_T, "%ld")
@@ -631,8 +636,29 @@
 	AC_DEFINE(F_XPID_T, "%x")
 fi
 
+dnl AC_CHECK_FUNCS(res_query)
+AC_CACHE_CHECK([for the resolver calls], 
+	       ac_cv_resquery_ok, 
+[AC_TRY_COMPILE([#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>], 
+	        [
+			char *domain="www.google.com";
+			u_char *answer;
+			int len;
+			len = res_query( domain, C_IN, T_A, answer, PACKETSZ );
+		],
+                ac_cv_resquery_ok=yes,
+		ac_cv_resquery_ok=no)
+])
+echo "resquery: $ac_cv_resquery_ok"
 
+dnl if test "$ac_cv_resquery_ok" = "no" ; then
+dnl    AC_DEFINE(RES_QUERY_GONE, "#error resquery not here. can't continue.")
+dnl fi
 
+
+
 AC_CACHE_CHECK([for ut_host in struct utmp], ac_cv_struct_ut_host,
 [AC_TRY_COMPILE([#include <sys/types.h>
 #include <utmp.h>], [struct utmp ut; ut.ut_host;],
Index: msgbase.c
===================================================================
--- msgbase.c	(revision 5134)
+++ msgbase.c	(working copy)
@@ -3214,7 +3214,7 @@
 				 * because if the address were valid, we would have
 				 * already translated it to a local address by now.
 				 */
-				if (IsDirectory(this_recp)) {
+				if (IsDirectory(this_recp, 1)) {
 					++ret->num_error;
 					invalid = 1;
 				}
Index: routines2.c
===================================================================
--- routines2.c	(revision 5134)
+++ routines2.c	(working copy)
@@ -919,6 +919,7 @@
 	keyopt(" <4> directory      (Consult the Global Address Book)\n");
 	keyopt(" <5> SpamAssassin   (Address of SpamAssassin server)\n");
 	keyopt(" <6> RBL            (domain suffix of spam hunting RBL)\n");
+	keyopt(" <7> spoof          (domains which users may spoof)\n");
 	sel = intprompt("Which one", 1, 1, 6);
 	switch(sel) {
 		case 1:	strcpy(buf, "localhost");
@@ -933,6 +934,8 @@
 			return;
 		case 6:	strcpy(buf, "rbl");
 			return;
+		case 7:	strcpy(buf, "spoofdomain");
+			return;
 	}
 }
 
Index: internet_addressing.c
===================================================================
--- internet_addressing.c	(revision 5134)
+++ internet_addressing.c	(working copy)
@@ -94,6 +94,10 @@
 		   && (!strcasecmp(&fqdn[strlen(fqdn)-strlen(host)], host)))
 			return(hostalias_directory);
 
+		if ( (!strcasecmp(type, "spoofdomain"))
+		   && (!strcasecmp(&fqdn[strlen(fqdn)-strlen(host)], host)))
+			return(hostalias_spoof);
+
 	}
 
 	return(hostalias_nomatch);
@@ -564,7 +568,7 @@
 /* Return nonzero if the supplied address is in a domain we keep in
  * the directory
  */
-int IsDirectory(char *addr) {
+int IsDirectory(char *addr, int local_addrs_only) {
 	char domain[256];
 	int h;
 
@@ -573,6 +577,9 @@
 
 	h = CtdlHostAlias(domain);
 
+	if ( (h == hostalias_spoof) && ! local_addrs_only)
+		return(1);
+	
 	if ( (h == hostalias_localhost) || (h == hostalias_directory) ) {
 		return(1);
 	}
@@ -598,7 +605,7 @@
 
 	lprintf(CTDL_DEBUG, "Dir: %s --> %s\n",
 		internet_addr, citadel_addr);
-	if (IsDirectory(internet_addr) == 0) return;
+	if (IsDirectory(internet_addr, 1) == 0) return;
 
 	directory_key(key, internet_addr);
 
@@ -637,7 +644,7 @@
 	if (num_tokens(internet_addr, '@') != 2) return(-1);
 
 	/* Only do lookups for domains in the directory */
-	if (IsDirectory(internet_addr) == 0) return(-1);
+	if (IsDirectory(internet_addr, 1) == 0) return(-1);
 
 	directory_key(key, internet_addr);
 	cdbrec = cdb_fetch(CDB_DIRECTORY, key, strlen(key) );
@@ -674,7 +681,7 @@
 		strcat(addr, " <");
 		strcat(addr, msg->cm_fields['F']);
 		strcat(addr, ">");
-		if (IsDirectory(msg->cm_fields['F'])) {
+		if (IsDirectory(msg->cm_fields['F'], 1)) {
 			is_harvestable = 0;
 		}
 	}
Index: internet_addressing.h
===================================================================
--- internet_addressing.h	(revision 5134)
+++ internet_addressing.h	(working copy)
@@ -17,7 +17,7 @@
 void process_rfc822_addr(const char *rfc822, char *user, char *node, char *name);
 char *rfc822_fetch_field(char *rfc822, char *fieldname);
 
-int IsDirectory(char *addr);
+int IsDirectory(char *addr, int local_addrs_only);
 void CtdlDirectoryInit(void);
 void CtdlDirectoryAddUser(char *internet_addr, char *citadel_addr);
 void CtdlDirectoryDelUser(char *internet_addr, char *citadel_addr);
@@ -33,7 +33,8 @@
 	hostalias_nomatch,
 	hostalias_localhost,
 	hostalias_gatewaydomain,
-	hostalias_directory
+	hostalias_directory,
+	hostalias_spoof
 };
 
 extern char *inetcfg;
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 5134)
+++ debian/changelog	(working copy)
@@ -2,23 +2,26 @@
   
     * fix permission bug
   
-   -- Wilfried Goesgens <[EMAIL PROTECTED]>  Fri, 06 Apr 2007 19:07:00 +0000
+ -- Wilfried Goesgens <[EMAIL PROTECTED]>  Fri, 06 Apr 2007 19:07:00 +0000
+
 citadel (7.07-14) unstable; urgency=low
+
+  * update to actual Citadel SVN. many new features. see Packages changelog.
   
-    * update to actual Citadel SVN. many new features. see Packages changelog.
-  
-   -- Wilfried Goesgens <[EMAIL PROTECTED]>  Fri, 06 Apr 2007 19:07:00 +0000
+ -- Wilfried Goesgens <[EMAIL PROTECTED]>  Fri, 06 Apr 2007 19:07:00 +0000
+
 citadel (7.06-13) stable; urgency=high
   
     * fixed location of key files
   
-   -- Wilfried Goesgens <[EMAIL PROTECTED]>  Sun, 1 Apr 2007 11:09:00 +0100
+ -- Wilfried Goesgens <[EMAIL PROTECTED]>  Sun, 1 Apr 2007 11:09:00 +0100
   
 citadel (7.06-12) stable; urgency=high
   
     * updated mime-parser
   
-   -- Wilfried Goesgens <[EMAIL PROTECTED]>  Mon, 21 Mar 2007 11:09:00 +0100
+ -- Wilfried Goesgens <[EMAIL PROTECTED]>  Mon, 21 Mar 2007 11:09:00 +0100
+
 citadel (7.06-11) unstable; urgency=low
 
   * fixes to the configure script.
Index: debian/rules
===================================================================
--- debian/rules	(revision 5134)
+++ debian/rules	(working copy)
@@ -10,11 +10,11 @@
 
 CFLAGS = -Wall -g
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+#ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0 -ggdb
-else
-	CFLAGS += -O2
-endif
+#else
+#	CFLAGS += -O2
+#endif
 
 configure: configure-stamp
 configure-stamp:
Index: serv_vcard.c
===================================================================
--- serv_vcard.c	(revision 5134)
+++ serv_vcard.c	(working copy)
@@ -218,7 +218,8 @@
 		addr = strdup(s);
 		striplt(addr);
 		if (strlen(addr) > 0) {
-			if ( (IsDirectory(addr)) || (!local_addrs_only) ) {
+			if ( (IsDirectory(addr, config.c_allow_spoofing)) || 
+			     (!local_addrs_only) ) {
 				++saved_instance;
 				if ((saved_instance == 1) && (emailaddrbuf != NULL)) {
 					safestrncpy(emailaddrbuf, addr, emailaddrbuf_len);
Index: preferences.c
===================================================================
--- preferences.c	(revision 5096)
+++ preferences.c	(working copy)
@@ -353,7 +353,7 @@
 	wprintf(" onChange=\"show_or_hide_sigbox();\" >");
 	wprintf(_("Use this signature:"));
 	wprintf("<div id=\"signature_box\">"
-		"<br><textarea name=\"signature\" cols=\"40\" rows=\"5\">"
+		"<br><textarea name=\"signature\" cols=\"100\" rows=\"50\">"
 	);
 	get_preference("signature", ebuf, sizeof ebuf);
 	euid_unescapize(buf, ebuf);
@@ -400,7 +400,7 @@
  */
 void set_preferences(void)
 {
-	char ebuf[300];
+	char ebuf[SIZ];
 
 	if (strlen(bstr("change_button")) == 0) {
 		safestrncpy(WC->ImportantMessage, 
Index: inetconf.c
===================================================================
--- inetconf.c	(revision 5096)
+++ inetconf.c	(working copy)
@@ -27,6 +27,7 @@
 		ic_smarthost,
 		ic_rbl,
 		ic_spamass,
+		ic_spoof,
 		ic_max
 	};
 	char *ic_spec[ic_max];
@@ -42,6 +43,8 @@
 	ic_keyword[3] = "smarthost";
 	ic_keyword[4] = "rbl";
 	ic_keyword[5] = "spamassassin";
+	ic_keyword[6] = "spoofdomain";
+       
 
 	ic_boxtitle[0] = _("Local host aliases");
 	ic_boxtitle[1] = _("Directory domains");
@@ -49,6 +52,7 @@
 	ic_boxtitle[3] = _("Smart hosts");
 	ic_boxtitle[4] = _("RBL hosts");
 	ic_boxtitle[5] = _("SpamAssassin hosts");
+	ic_boxtitle[6] = _("Spoofable domains");
 
 	ic_desc[0] = _("(domains for which this host receives mail)");
 	ic_desc[1] = _("(domains mapped with the Global Address Book)");
@@ -56,6 +60,7 @@
 	ic_desc[3] = _("(if present, forward all outbound mail to one of these hosts)");
 	ic_desc[4] = _("(hosts running a Realtime Blackhole List)");
 	ic_desc[5] = _("(hosts running the SpamAssassin service)");
+	ic_desc[6] = _("(non local domains users may spoof)");
 
 	for (i=0; i<ic_max; ++i) {
 		ic_spec[i] = strdup("");

Reply via email to