X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fuams%2Fuams_guest.c;h=00f90ece0972ee01670d5cc1eee55879d6795b35;hb=be96d276348da0a7e66eeec844b306e8a5fa8fac;hp=0b7f000bdca079b79d4e1530ac9f5002d6574d2c;hpb=3adfc34b14bf40a472c82eb328b9c3160df7e127;p=netatalk.git diff --git a/etc/uams/uams_guest.c b/etc/uams/uams_guest.c index 0b7f000b..00f90ece 100644 --- a/etc/uams/uams_guest.c +++ b/etc/uams/uams_guest.c @@ -1,5 +1,5 @@ /* - * $Id: uams_guest.c,v 1.14 2009-09-14 00:02:21 didg Exp $ + * $Id: uams_guest.c,v 1.18 2009-11-08 01:07:17 didg Exp $ * * (c) 2001 (see COPYING) */ @@ -11,39 +11,27 @@ #include #include #include - -/* STDC check */ -#if STDC_HEADERS #include -#else /* STDC_HEADERS */ -#ifndef HAVE_STRCHR -#define strchr index -#define strrchr index -#endif /* HAVE_STRCHR */ -char *strchr (), *strrchr (); -#ifndef HAVE_MEMCPY -#define memcpy(d,s,n) bcopy ((s), (d), (n)) -#define memmove(d,s,n) bcopy ((s), (d), (n)) -#endif /* ! HAVE_MEMCPY */ -#endif /* STDC_HEADERS */ - #include -#include +#include #include #include #include +#include #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif /* MIN */ -extern void append(void *, const char *, int); +/*XXX in etc/papd/file.h */ +struct papfile; +extern UAM_MODULE_EXPORT void append(struct papfile *, const char *, int); /* login and login_ext are almost the same */ static int noauth_login(void *obj, struct passwd **uam_pwd, - char *ibuf _U_, int ibuflen _U_, - char *rbuf _U_, int *rbuflen) + char *ibuf _U_, size_t ibuflen _U_, + char *rbuf _U_, size_t *rbuflen) { struct passwd *pwent; char *guest, *username; @@ -78,17 +66,15 @@ static int noauth_login(void *obj, struct passwd **uam_pwd, } static int noauth_login_ext(void *obj, char *uname _U_, struct passwd **uam_pwd, - char *ibuf, int ibuflen, - char *rbuf, int *rbuflen) + char *ibuf, size_t ibuflen, + char *rbuf, size_t *rbuflen) { return ( noauth_login (obj, uam_pwd, ibuf, ibuflen, rbuf, rbuflen)); } /* Printer NoAuthUAM Login */ -int noauth_printer(start, stop, username, out) - char *start, *stop, *username; - struct papfile *out; +static int noauth_printer(char *start, char *stop, char *username, struct papfile *out) { char *data, *p, *q; static const char *loginok = "0\r"; @@ -149,7 +135,7 @@ static int uam_setup(const char *path) return 0; } -static void uam_cleanup() +static void uam_cleanup(void) { uam_unregister(UAM_SERVER_LOGIN, "No User Authent"); uam_unregister(UAM_SERVER_PRINTAUTH, "NoAuthUAM");