summaryrefslogtreecommitdiff
path: root/rquota_svc.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2007-08-22 13:03:24 +0000
committerjkar8572 <jkar8572>2007-08-22 13:03:24 +0000
commit464de49af48dbc838bef288abe34805964b60125 (patch)
tree05bc7e37d922cd6a328e2c16138b3c19bfb07eaa /rquota_svc.c
parent6c1c1f4546b2b12c1ad4549ebc55f39ecabf8646 (diff)
Cleaned up host access handling in rpc.rquotad (Jan Kara)
Added allow_severity and deny_severity variables for older versions of libwrap (Martin Jacobs) Added MPFS to the list of supported filesystems (Dave Boone) Configure script now correctly reports checking of libwrap (Jan Kara)
Diffstat (limited to 'rquota_svc.c')
-rw-r--r--rquota_svc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/rquota_svc.c b/rquota_svc.c
index 08ebefa..5872464 100644
--- a/rquota_svc.c
+++ b/rquota_svc.c
@@ -12,7 +12,7 @@
* changes for new utilities by Jan Kara <jack@suse.cz>
* patches by Jani Jaakkola <jjaakkol@cs.helsinki.fi>
*
- * Version: $Id: rquota_svc.c,v 1.17 2005/06/01 07:20:50 jkar8572 Exp $
+ * Version: $Id: rquota_svc.c,v 1.18 2007/08/22 13:03:24 jkar8572 Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -36,6 +36,8 @@
#ifdef HOSTS_ACCESS
#include <tcpd.h>
#include <netdb.h>
+
+int deny_severity, allow_severity; /* Needed by some versions of libwrap */
#endif
#ifdef __STDC__
@@ -173,7 +175,7 @@ int good_client(struct sockaddr_in *addr, ulong rq_proc)
struct hostent *h;
char *name, **ad;
#endif
- const char *remote=inet_ntoa(addr->sin_addr);
+ char *remote = inet_ntoa(addr->sin_addr);
if (rq_proc==RQUOTAPROC_SETQUOTA ||
rq_proc==RQUOTAPROC_SETACTIVEQUOTA) {
@@ -213,13 +215,13 @@ int good_client(struct sockaddr_in *addr, ulong rq_proc)
if (!memcmp(*ad, &(addr->sin_addr), h->h_length))
break;
if (!*ad) /* Our address not found? */
- goto denied;
+ goto denied;
/* Check host name */
- if (hosts_ctl("rquotad", "", h->h_name, ""))
+ if (hosts_ctl("rquotad", h->h_name, remote, ""))
return 1;
/* Check aliases */
for (ad = h->h_aliases; *ad; ad++)
- if (hosts_ctl("rquotad", "", *ad, ""))
+ if (hosts_ctl("rquotad", *ad, remote, ""))
return 1;
denied:
errstr(_("Denied access to host %s\n"), remote);