1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

r15477: Committing parts of the patch Timur has submitted for bug 2961, as agreed upon

on irc.

Thanks,

Volker
(This used to be commit 51b415d2306f8244d7449756e4fa873adfc8fbe7)
This commit is contained in:
Volker Lendecke 2006-05-06 20:05:43 +00:00 committed by Gerald (Jerry) Carter
parent 5ab7e77bc7
commit fbc58eb455
2 changed files with 4 additions and 8 deletions

View File

@ -50,10 +50,6 @@ typedef struct {
#define set(x,ctrl) (ctrl = ((ctrl)&smb_args[x].mask)|smb_args[x].flag) #define set(x,ctrl) (ctrl = ((ctrl)&smb_args[x].mask)|smb_args[x].flag)
#define unset(x,ctrl) (ctrl &= ~(smb_args[x].flag)) #define unset(x,ctrl) (ctrl &= ~(smb_args[x].flag))
#ifndef __linux__
#define strncasecmp(s1,s2,n) StrnCaseCmp(s1,s2,n)
#endif
/* the generic mask */ /* the generic mask */
#define _ALL_ON_ (~0U) #define _ALL_ON_ (~0U)

View File

@ -114,7 +114,7 @@
struct pam_response *resp; struct pam_response *resp;
pmsg[0] = &msg[0]; pmsg[0] = &msg[0];
msg[0].msg = text; msg[0].msg = CONST_DISCARD(char *, text);
msg[0].msg_style = type; msg[0].msg_style = type;
resp = NULL; resp = NULL;
@ -515,7 +515,7 @@ int _smb_read_password( pam_handle_t * pamh, unsigned int ctrl,
if (comment != NULL && off(SMB__QUIET, ctrl)) { if (comment != NULL && off(SMB__QUIET, ctrl)) {
pmsg[0] = &msg[0]; pmsg[0] = &msg[0];
msg[0].msg_style = PAM_TEXT_INFO; msg[0].msg_style = PAM_TEXT_INFO;
msg[0].msg = comment; msg[0].msg = CONST_DISCARD(char *, comment);
i = 1; i = 1;
} else { } else {
i = 0; i = 0;
@ -523,12 +523,12 @@ int _smb_read_password( pam_handle_t * pamh, unsigned int ctrl,
pmsg[i] = &msg[i]; pmsg[i] = &msg[i];
msg[i].msg_style = PAM_PROMPT_ECHO_OFF; msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
msg[i++].msg = prompt1; msg[i++].msg = CONST_DISCARD(char *, prompt1);
if (prompt2 != NULL) { if (prompt2 != NULL) {
pmsg[i] = &msg[i]; pmsg[i] = &msg[i];
msg[i].msg_style = PAM_PROMPT_ECHO_OFF; msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
msg[i++].msg = prompt2; msg[i++].msg = CONST_DISCARD(char *, prompt2);
expect = 2; expect = 2;
} else } else
expect = 1; expect = 1;