summaryrefslogtreecommitdiffstats
path: root/source3/utils/smbcquotas.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-22 23:38:20 +0000
committerJeremy Allison <jra@samba.org>2003-10-22 23:38:20 +0000
commitbb0598faf58679a7ad26a1caab8eadb154a07ae2 (patch)
treebeee6b610df4ad7660cb174c86773bd9c747682c /source3/utils/smbcquotas.c
parent3531647574ba61ce69969c501fbc82937a4d4dfa (diff)
downloadsamba-bb0598faf58679a7ad26a1caab8eadb154a07ae2.tar.gz
samba-bb0598faf58679a7ad26a1caab8eadb154a07ae2.tar.xz
samba-bb0598faf58679a7ad26a1caab8eadb154a07ae2.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 d7e35dfb9283d560d0ed2ab231f36ed92767dace)
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 64321d5bfc3..0bd87554209 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;