X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fmts.c;h=37f6e237be4a207e8ca540a9127ff39d8c777a1e;hb=164be8e5e8b40ce4572281be26d423a9c9d595f3;hp=6a9d84f48f13fe36a45686a220202ad71a149fb5;hpb=5dd6771b28c257af405d7248639ed0e3bcdce38b;p=mmh diff --git a/sbr/mts.c b/sbr/mts.c index 6a9d84f..37f6e23 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -17,12 +17,9 @@ #include #include #include +#include #include -#ifdef HAVE_SYS_UTSNAME_H -# include -#endif - #define NOTOK (-1) #define OK 0 @@ -88,21 +85,6 @@ char *servers = "localhost \01localnet"; char *pophost = ""; /* - * BBoards-specific variables - */ -char *bb_domain = ""; - - -/* - * POP BBoards-specific variables - */ -#ifdef BPOP -char *popbbhost = ""; -char *popbbuser = ""; -char *popbblist = nmhetcdir(/hosts.popbb); -#endif /* BPOP */ - -/* * Global MailDelivery file */ char *maildelivery = nmhetcdir(/maildelivery); @@ -146,17 +128,6 @@ static struct bind binds[] = { { "clientname", &clientname }, { "servers", &servers }, { "pophost", &pophost }, - { "bbdomain", &bb_domain }, - -#ifdef BPOP - { "popbbhost", &popbbhost }, - { "popbbuser", &popbbuser }, - { "popbblist", &popbblist }, -#endif - -#ifdef NNTP - { "nntphost", &popbbhost }, -#endif { "maildelivery", &maildelivery }, { "everyone", &everyone }, @@ -275,9 +246,6 @@ LocalName (void) { static char buffer[BUFSIZ] = ""; struct addrinfo hints, *res; -#ifdef HAVE_UNAME - struct utsname name; -#endif /* check if we have cached the local name */ if (buffer[0]) @@ -290,14 +258,8 @@ LocalName (void) strncpy (buffer, localname, sizeof(buffer)); } else { memset(buffer, 0, sizeof(buffer)); -#ifdef HAVE_UNAME - /* first get our local name */ - uname (&name); - strncpy (buffer, name.nodename, sizeof(buffer) - 1); -#else /* first get our local name */ gethostname (buffer, sizeof(buffer) - 1); -#endif /* now fully qualify our name */ memset(&hints, 0, sizeof(hints)); @@ -332,10 +294,6 @@ SystemName (void) { static char buffer[BUFSIZ] = ""; -#ifdef HAVE_UNAME - struct utsname name; -#endif - /* check if we have cached the system name */ if (buffer[0]) return buffer; @@ -348,12 +306,7 @@ SystemName (void) return buffer; } -#ifdef HAVE_UNAME - uname (&name); - strncpy (buffer, name.nodename, sizeof(buffer)); -#else gethostname (buffer, sizeof(buffer)); -#endif return buffer; } @@ -401,21 +354,9 @@ getuserinfo (void) register char *np; register struct passwd *pw; -#ifdef KPOP - uid_t uid; - - uid = getuid (); - if (uid == geteuid () && (cp = getenv ("USER")) != NULL - && (pw = getpwnam (cp)) != NULL) - strncpy (username, cp, sizeof(username)); - else if ((pw = getpwuid (uid)) == NULL - || pw->pw_name == NULL - || *pw->pw_name == '\0') { -#else /* KPOP */ if ((pw = getpwuid (getuid ())) == NULL || pw->pw_name == NULL || *pw->pw_name == '\0') { -#endif /* KPOP */ strncpy (username, "unknown", sizeof(username)); snprintf (fullname, sizeof(fullname), "The Unknown User-ID (%d)", (int) getuid ());