annotate src/portable.h @ 288:c02c4eb95f95 noffle

[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user and noffle-group configs. * src/configfile.c,src/fetch.c,src/fetchlist.c,src/protocol.c, src/server.c: Replace strcpy() with Utl_cpyStr() where appropriate. See Debian bug 168128. * src/control.c,src/configfile.c,src/noffle.c: Replace [s]scanf("%s") with [s]scanf(MAXCHAR_FMT). * src/noffle.c: Log warning if noffle.conf is world readable. * src/noffle.c: Restrict most options to news admins; i.e. those who are root or news on running Noffle. * Makefile.in,acconfig.h,aclocal.m4,config.h.in,configure,configure.in, docs/Makefile.in,docs/noffle.conf.5,packages/Makefile.in, packages/redhat/Makefile.in,src/Makefile.am,src/Makefile.in, src/authenticate.c,src/authenticate.h,src/noffle.c,src/server.c: Add basic authentication using either Noffle-specific user file or authenticating via PAM (service 'noffle'). PAM authentication needs to run as root, so a Noffle server that needs PAM must be started by root. Helpful (?) error messages will be logged if not. Noffle will switch ruid and euid to 'news' (or whatever is configured) ASAP. * src/noffle.c: Add uid checking.
author bears
date Fri, 10 Jan 2003 23:25:45 +0000
parents c7df2cc65cc1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55
uh1763
parents:
diff changeset
1 /*
uh1763
parents:
diff changeset
2 portable.h
uh1763
parents:
diff changeset
3
uh1763
parents:
diff changeset
4 Compatibility checks and fallback-functions.
uh1763
parents:
diff changeset
5
74
c7df2cc65cc1 [svn] Introduce UNUSED(x) macro
bears
parents: 55
diff changeset
6 $Id: portable.h 80 2000-05-13 15:36:35Z bears $
55
uh1763
parents:
diff changeset
7 */
uh1763
parents:
diff changeset
8
uh1763
parents:
diff changeset
9 #ifndef PORTABLE_H
uh1763
parents:
diff changeset
10 #define PORTABLE_H /* To stop multiple inclusions. */
uh1763
parents:
diff changeset
11
uh1763
parents:
diff changeset
12
uh1763
parents:
diff changeset
13 #if HAVE_CONFIG_H
uh1763
parents:
diff changeset
14 #include <config.h>
uh1763
parents:
diff changeset
15 #endif
uh1763
parents:
diff changeset
16
uh1763
parents:
diff changeset
17 #if !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF)
uh1763
parents:
diff changeset
18 #undef vsnprintf
uh1763
parents:
diff changeset
19 #define vsnprintf __vsnprintf
uh1763
parents:
diff changeset
20 #define HAVE_VSNPRINTF
uh1763
parents:
diff changeset
21 #endif
uh1763
parents:
diff changeset
22
uh1763
parents:
diff changeset
23 /* This is *not* good, because vsprintf() doesn't do any bounds-checking */
uh1763
parents:
diff changeset
24 #if !defined(HAVE_VSNPRINTF) && !defined(HAVE___VSNPRINTF)
uh1763
parents:
diff changeset
25 #define vsnprintf(c, len, fmt, args) vsprintf(c, fmt, args)
uh1763
parents:
diff changeset
26 #define HAVE_VSNPRINTF
uh1763
parents:
diff changeset
27 #endif
uh1763
parents:
diff changeset
28
uh1763
parents:
diff changeset
29 #if !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF)
uh1763
parents:
diff changeset
30 #undef snprintf
uh1763
parents:
diff changeset
31 #define snprintf __snprintf
uh1763
parents:
diff changeset
32 #define HAVE_SNPRINTF
uh1763
parents:
diff changeset
33 #endif
uh1763
parents:
diff changeset
34
74
c7df2cc65cc1 [svn] Introduce UNUSED(x) macro
bears
parents: 55
diff changeset
35 /* Indicate deliberately unused argument. Possibly compiler specific. */
c7df2cc65cc1 [svn] Introduce UNUSED(x) macro
bears
parents: 55
diff changeset
36 #define UNUSED(x) { ( void ) x; }
55
uh1763
parents:
diff changeset
37
uh1763
parents:
diff changeset
38 #endif
uh1763
parents:
diff changeset
39