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 | 12 | diff --git a/access.c b/access.c |
fc557362 | 13 | index 9a023de..c6d9f3c 100644 |
cc3e685d WD |
14 | --- a/access.c |
15 | +++ b/access.c | |
16 | @@ -19,11 +19,14 @@ | |
b3593e7c | 17 | */ |
1b7984b2 WD |
18 | |
19 | #include "rsync.h" | |
20 | +#include <netdb.h> | |
21 | ||
fc557362 | 22 | static int match_hostname(const char *host, const char *tok) |
1b7984b2 | 23 | { |
e405772a WD |
24 | if (!host || !*host) |
25 | return 0; | |
8871c12a | 26 | + if (*tok == '@' && tok[1]) |
1b7984b2 | 27 | + return innetgr(tok + 1, host, NULL, NULL); |
fc557362 | 28 | return iwildmatch(tok, host); |
1b7984b2 WD |
29 | } |
30 |