]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rgw_str_to_bool() should also accept "true"
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 12 Dec 2017 12:25:16 +0000 (04:25 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 12 Apr 2018 22:38:36 +0000 (15:38 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_common.h

index 8cd71a276a51b284e3ea1cafc1789057ff65ce5a..520fc2bf0e0befc06bb10d677750436bb29c3db0 100644 (file)
@@ -2186,7 +2186,8 @@ static inline int rgw_str_to_bool(const char *s, int def_val)
   if (!s)
     return def_val;
 
-  return (strcasecmp(s, "on") == 0 ||
+  return (strcasecmp(s, "true") == 0 ||
+          strcasecmp(s, "on") == 0 ||
           strcasecmp(s, "yes") == 0 ||
           strcasecmp(s, "1") == 0);
 }