From 00e247ee44067f2b3e7ca5f7e6dc2f7934c97181 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Pradhan Date: Wed, 9 Apr 2014 10:19:43 +0530 Subject: gNFS: Support wildcard in RPC auth allow/reject RFE: Support wildcard in "nfs.rpc-auth-allow" and "nfs.rpc-auth-reject". e.g. *.redhat.com 192.168.1[1-5].* 192.168.1[1-5].*, *.redhat.com, 192.168.21.9 Along with wildcard, support for subnetwork or IP range e.g. 192.168.10.23/24 The option will be validated for following categories: 1) Anonymous i.e. "*" 2) Wildcard pattern i.e. string containing any ('*', '?', '[') 3) IPv4 address 4) IPv6 address 5) FQDN 6) subnetwork or IPv4 range Currently this does not support IPv6 subnetwork. Change-Id: Iac8caf5e490c8174d61111dad47fd547d4f67bf4 BUG: 1086097 Signed-off-by: Santosh Kumar Pradhan Reviewed-on: http://review.gluster.org/7485 Reviewed-by: Poornima G Reviewed-by: Harshavardhana Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/common-utils.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libglusterfs/src/common-utils.h') diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index e17029dba..3a58a9331 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -580,9 +580,8 @@ char valid_host_name (char *address, int length); char valid_ipv4_address (char *address, int length, gf_boolean_t wildcard_acc); char valid_ipv6_address (char *address, int length, gf_boolean_t wildcard_acc); char valid_internet_address (char *address, gf_boolean_t wildcard_acc); -char valid_ipv4_wildcard_check (char *address); -char valid_ipv6_wildcard_check (char *address); -char valid_wildcard_internet_address (char *address); +gf_boolean_t valid_mount_auth_address (char *address); +gf_boolean_t valid_ipv4_subnetwork (const char *address); gf_boolean_t gf_sock_union_equal_addr (union gf_sock_union *a, union gf_sock_union *b); -- cgit From a3cb38e3edf005bef73da4c9cfd958474a14d50f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 17 Apr 2014 15:54:34 -0700 Subject: build: MacOSX Porting fixes git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs Working functionality on MacOSX - GlusterD (management daemon) - GlusterCLI (management cli) - GlusterFS FUSE (using OSXFUSE) - GlusterNFS (without NLM - issues with rpc.statd) Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac BUG: 1089172 Signed-off-by: Harshavardhana Signed-off-by: Dennis Schafroth Tested-by: Harshavardhana Tested-by: Dennis Schafroth Reviewed-on: http://review.gluster.org/7503 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/common-utils.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/common-utils.h') diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index 3a58a9331..f11c95fa8 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -488,12 +488,12 @@ static inline void gf_time_fmt (char *dst, size_t sz_dst, time_t utime, unsigned int fmt) { extern void _gf_timestuff (gf_timefmts *, const char ***, const char ***); - static gf_timefmts timefmt_last = (gf_timefmts) -1; + static gf_timefmts timefmt_last = (gf_timefmts) - 1; static const char **fmts; static const char **zeros; struct tm tm; - if (timefmt_last == -1) + if (timefmt_last == (gf_timefmts) - 1) _gf_timestuff (&timefmt_last, &fmts, &zeros); if (timefmt_last < fmt) fmt = gf_timefmt_default; if (utime && gmtime_r (&utime, &tm) != NULL) { @@ -552,8 +552,9 @@ int gf_string2uint8_base10 (const char *str, uint8_t *n); int gf_string2uint16_base10 (const char *str, uint16_t *n); int gf_string2uint32_base10 (const char *str, uint32_t *n); int gf_string2uint64_base10 (const char *str, uint64_t *n); - int gf_string2bytesize (const char *str, uint64_t *n); +int gf_string2bytesize_size (const char *str, size_t *n); +int gf_string2bytesize_uint64 (const char *str, uint64_t *n); int gf_string2percent_or_bytesize (const char *str, uint64_t *n, gf_boolean_t *is_percent); @@ -626,7 +627,7 @@ gf_skip_header_section (int fd, int header_len); struct iatt; struct _dict; -inline gf_boolean_t +gf_boolean_t dht_is_linkfile (struct iatt *buf, struct _dict *dict); int -- cgit