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:
parent
5ab7e77bc7
commit
fbc58eb455
@ -50,10 +50,6 @@ typedef struct {
|
||||
#define set(x,ctrl) (ctrl = ((ctrl)&smb_args[x].mask)|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 */
|
||||
#define _ALL_ON_ (~0U)
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
||||
struct pam_response *resp;
|
||||
|
||||
pmsg[0] = &msg[0];
|
||||
msg[0].msg = text;
|
||||
msg[0].msg = CONST_DISCARD(char *, text);
|
||||
msg[0].msg_style = type;
|
||||
resp = NULL;
|
||||
|
||||
@ -515,7 +515,7 @@ int _smb_read_password( pam_handle_t * pamh, unsigned int ctrl,
|
||||
if (comment != NULL && off(SMB__QUIET, ctrl)) {
|
||||
pmsg[0] = &msg[0];
|
||||
msg[0].msg_style = PAM_TEXT_INFO;
|
||||
msg[0].msg = comment;
|
||||
msg[0].msg = CONST_DISCARD(char *, comment);
|
||||
i = 1;
|
||||
} else {
|
||||
i = 0;
|
||||
@ -523,12 +523,12 @@ int _smb_read_password( pam_handle_t * pamh, unsigned int ctrl,
|
||||
|
||||
pmsg[i] = &msg[i];
|
||||
msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
|
||||
msg[i++].msg = prompt1;
|
||||
msg[i++].msg = CONST_DISCARD(char *, prompt1);
|
||||
|
||||
if (prompt2 != NULL) {
|
||||
pmsg[i] = &msg[i];
|
||||
msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
|
||||
msg[i++].msg = prompt2;
|
||||
msg[i++].msg = CONST_DISCARD(char *, prompt2);
|
||||
expect = 2;
|
||||
} else
|
||||
expect = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user