innetgr revised netgroup patch against 2.6.0
Travis Freeland
travis at deakin.edu.au
Sun Feb 1 12:25:22 GMT 2004
innetgr.. much easier..
Had a look for the user section but didn't find it in my 15 seconds of
looking..
--- access.c 2003-07-30 16:12:27.000000000 +1000
+++ ../rsync-2.6.0-Linux/access.c 2004-02-01 23:21:12.000000000 +1100
@@ -22,10 +22,21 @@
*/
#include "rsync.h"
+#include <netdb.h>
static int match_hostname(char *host, char *tok)
{
+ char *netgroup;
+
+ if(strlen(tok)>1){
+ if(tok[0]=='@'){
+ netgroup=tok+1;
+ if(innetgr(netgroup, host, NULL, NULL)){
+ return(1);
+ }
+ }
+ }
if (!host || !*host) return 0;
return wildmatch(tok, host);
}
Travis
http://www.deakin.edu.au/~travis/sig.html
More information about the rsync
mailing list