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 | ||
9a7eef96 WD |
12 | --- old/access.c |
13 | +++ new/access.c | |
b3593e7c WD |
14 | @@ -20,11 +20,14 @@ |
15 | */ | |
1b7984b2 WD |
16 | |
17 | #include "rsync.h" | |
18 | +#include <netdb.h> | |
19 | ||
1b7984b2 WD |
20 | static int match_hostname(char *host, char *tok) |
21 | { | |
e405772a WD |
22 | if (!host || !*host) |
23 | return 0; | |
1b7984b2 WD |
24 | + if (*tok == '@' && tok[1]) |
25 | + return innetgr(tok + 1, host, NULL, NULL); | |
26 | return wildmatch(tok, host); | |
27 | } | |
28 |