summaryrefslogtreecommitdiff
path: root/source3/utils/smbcquotas.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-22 23:38:18 +0000
committerJeremy Allison <jra@samba.org>2003-10-22 23:38:18 +0000
commit2710c35e549bb7775a8efe3265b105e594ad26ba (patch)
treebb72b0ffdf54c716dca54fbe5a22f3ef7c510a52 /source3/utils/smbcquotas.c
parentbca9e7d3258058594daaaedd2518fcb2c793ded0 (diff)
downloadsamba-2710c35e549bb7775a8efe3265b105e594ad26ba.tar.gz
samba-2710c35e549bb7775a8efe3265b105e594ad26ba.tar.bz2
samba-2710c35e549bb7775a8efe3265b105e594ad26ba.zip
Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at all and I really want to discourage that. Jeremy. (This used to be commit 5c050a735f86927c7ef2a98b6f3a56abe39e4674)
Diffstat (limited to 'source3/utils/smbcquotas.c')
-rw-r--r--source3/utils/smbcquotas.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 64321d5bfc..0bd8755420 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -140,7 +140,7 @@ static int parse_quota_set(pstring set_str, pstring username_str, enum SMB_QUOTA
BOOL enable = False;
BOOL deny = False;
- if (strncasecmp(set_str,"UQLIM:",6)==0) {
+ if (strnequal(set_str,"UQLIM:",6)) {
p += 6;
*qtype = SMB_USER_QUOTA_TYPE;
*cmd = QUOTA_SETLIM;
@@ -154,12 +154,12 @@ static int parse_quota_set(pstring set_str, pstring username_str, enum SMB_QUOTA
fstrcpy(username_str,p);
p = p2;
- } else if (strncasecmp(set_str,"FSQLIM:",7)==0) {
+ } else if (strnequal(set_str,"FSQLIM:",7)) {
p +=7;
*qtype = SMB_USER_FS_QUOTA_TYPE;
*cmd = QUOTA_SETLIM;
todo = PARSE_LIM;
- } else if (strncasecmp(set_str,"FSQFLAGS:",9)==0) {
+ } else if (strnequal(set_str,"FSQFLAGS:",9)) {
p +=9;
todo = PARSE_FLAGS;
*qtype = SMB_USER_FS_QUOTA_TYPE;
@@ -189,13 +189,13 @@ static int parse_quota_set(pstring set_str, pstring username_str, enum SMB_QUOTA
p2++;
}
- if (strncasecmp(p,"QUOTA_ENABLED",13)==0) {
+ if (strnequal(p,"QUOTA_ENABLED",13)) {
enable = True;
- } else if (strncasecmp(p,"DENY_DISK",9)==0) {
+ } else if (strnequal(p,"DENY_DISK",9)) {
deny = True;
- } else if (strncasecmp(p,"LOG_SOFTLIMIT",13)==0) {
+ } else if (strnequal(p,"LOG_SOFTLIMIT",13)) {
pqt->qflags |= QUOTAS_LOG_THRESHOLD;
- } else if (strncasecmp(p,"LOG_HARDLIMIT",13)==0) {
+ } else if (strnequal(p,"LOG_HARDLIMIT",13)) {
pqt->qflags |= QUOTAS_LOG_LIMIT;
} else {
return -1;