diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:36:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:36:09 +0000 |
commit | 527e824293ee934ca5da0ef5424efe5ab7757248 (patch) | |
tree | dd86fab3b0ba9cdbd86661dfae562fa123a8f53c /source3/lib/cmd_interp.c | |
parent | 87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 (diff) | |
download | samba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.gz samba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.bz2 samba-527e824293ee934ca5da0ef5424efe5ab7757248.zip |
strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
Diffstat (limited to 'source3/lib/cmd_interp.c')
-rw-r--r-- | source3/lib/cmd_interp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/cmd_interp.c b/source3/lib/cmd_interp.c index ef6f94bd49..292f0e9e9e 100644 --- a/source3/lib/cmd_interp.c +++ b/source3/lib/cmd_interp.c @@ -365,7 +365,7 @@ static uint32 process(struct client_info *info, char *cmd_str) { char *p; - if ((p = strchr(cmd, ';')) == 0) + if ((p = strchr_m(cmd, ';')) == 0) { strncpy(line, cmd, 999); line[1000] = '\0'; @@ -702,11 +702,11 @@ static uint32 cmd_use(struct client_info *info, int argc, char *argv[]) { char *lp; pstrcpy(usr.ntc.user_name, optarg); - if ((lp = strchr(usr.ntc.user_name, '%'))) + if ((lp = strchr_m(usr.ntc.user_name, '%'))) { *lp = 0; pstrcpy(password, lp + 1); - memset(strchr(optarg, '%') + 1, 'X', + memset(strchr_m(optarg, '%') + 1, 'X', strlen(password)); got_pwd = True; } @@ -1012,7 +1012,7 @@ static uint32 cmd_set(CLIENT_INFO *info, int argc, char *argv[]) char *lp; cmd_set_options |= CMD_USER; pstrcpy(usr.ntc.user_name, optarg); - if ((lp = strchr(usr.ntc.user_name, '%'))) + if ((lp = strchr_m(usr.ntc.user_name, '%'))) { *lp = 0; pstrcpy(password, lp + 1); @@ -1241,11 +1241,11 @@ static void read_user_env(struct ntuser_creds *u) /* modification to support userid%passwd syntax in the USER var 25.Aug.97, jdblair@uab.edu */ - if ((p = strchr(u->user_name, '%'))) + if ((p = strchr_m(u->user_name, '%'))) { *p = 0; pstrcpy(password, p + 1); - memset(strchr(getenv("USER"), '%') + 1, 'X', + memset(strchr_m(getenv("USER"), '%') + 1, 'X', strlen(password)); } } |