Commit | Line | Data |
---|---|---|
1b7984b2 WD |
1 | This allows you to use the samba style @netgroup names in hosts allow |
2 | and hosts deny. | |
3 | ||
4 | This patch still needs autoconf support for portability. | |
5 | ||
03019e41 WD |
6 | To use this patch, run these commands for a successful build: |
7 | ||
8 | patch -p1 <patches/netgroup-auth.diff | |
9 | ./configure (optional if already run) | |
10 | make | |
11 | ||
cc3e685d WD |
12 | diff --git a/access.c b/access.c |
13 | --- a/access.c | |
14 | +++ b/access.c | |
15 | @@ -19,11 +19,14 @@ | |
b3593e7c | 16 | */ |
1b7984b2 WD |
17 | |
18 | #include "rsync.h" | |
19 | +#include <netdb.h> | |
20 | ||
1b7984b2 WD |
21 | static int match_hostname(char *host, char *tok) |
22 | { | |
e405772a WD |
23 | if (!host || !*host) |
24 | return 0; | |
8871c12a | 25 | + if (*tok == '@' && tok[1]) |
1b7984b2 WD |
26 | + return innetgr(tok + 1, host, NULL, NULL); |
27 | return wildmatch(tok, host); | |
28 | } | |
29 |