summaryrefslogtreecommitdiff
path: root/source3/utils
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
parent3531647574ba61ce69969c501fbc82937a4d4dfa (diff)
downloadsamba-bb0598faf58679a7ad26a1caab8eadb154a07ae2.tar.gz
samba-bb0598faf58679a7ad26a1caab8eadb154a07ae2.tar.bz2
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')
-rw-r--r--source3/utils/net.c8
-rw-r--r--source3/utils/smbcquotas.c14
2 files changed, 11 insertions, 11 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 42966b4f83..38c144caa8 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -84,14 +84,14 @@ uint32 get_sec_channel_type(const char *param)
if (!(param && *param)) {
return get_default_sec_channel();
} else {
- if (strcasecmp(param, "PDC")==0) {
+ if (strequal(param, "PDC")) {
return SEC_CHAN_BDC;
- } else if (strcasecmp(param, "BDC")==0) {
+ } else if (strequal(param, "BDC")) {
return SEC_CHAN_BDC;
- } else if (strcasecmp(param, "MEMBER")==0) {
+ } else if (strequal(param, "MEMBER")) {
return SEC_CHAN_WKSTA;
#if 0
- } else if (strcasecmp(param, "DOMAIN")==0) {
+ } else if (strequal(param, "DOMAIN")) {
return SEC_CHAN_DOMAIN;
#endif
} else {
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;