1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

Merged John's changes.

Jeremy.
This commit is contained in:
Jeremy Allison -
parent be45c82c3a
commit add847778b
3 changed files with 7 additions and 3 deletions

View File

@ -180,6 +180,7 @@ static BOOL proc_pam_start(pam_handle_t **pamh, char *user)
}
#endif
#ifdef PAM_TTY
DEBUG(4,("PAM: setting tty\n"));
pam_error = pam_set_item(*pamh, PAM_TTY, "samba");
if (!pam_error_handler(*pamh, pam_error, "set tty failed", 0)) {
proc_pam_end(*pamh);
@ -272,6 +273,7 @@ static BOOL pam_account(pam_handle_t *pamh, char * user, char * password)
* exporting an AFS cell, be able to /write/ to this cell.
*/
DEBUG(4,("PAM: Account Management SetCredentials for User: %s\n", user));
pam_error = pam_setcred(pamh, (PAM_ESTABLISH_CRED|PAM_SILENT));
if(!pam_error_handler(pamh, pam_error, "Set Credential Failure", 2)) {
proc_pam_end(pamh);

View File

@ -636,7 +636,7 @@ int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d)
int sys_acl_valid(SMB_ACL_T acl_d)
{
if (aclsort(acl_d->count, 0, acl_d->acl) != 0) {
if (aclsort(acl_d->count, 1, acl_d->acl) != 0) {
errno = EINVAL;
return -1;
}
@ -726,7 +726,7 @@ int sys_acl_set_file(char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d)
return -1;
}
if (aclsort(acl_count, 0, acl_p) != 0) {
if (aclsort(acl_count, 1, acl_p) != 0) {
errno = EINVAL;
ret = -1;
} else {
@ -742,7 +742,7 @@ int sys_acl_set_file(char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d)
int sys_acl_set_fd(int fd, SMB_ACL_T acl_d)
{
if (aclsort(acl_d->count, 0, acl_d->acl) != 0) {
if (aclsort(acl_d->count, 1, acl_d->acl) != 0) {
errno = EINVAL;
return -1;
}

View File

@ -180,6 +180,7 @@ static BOOL proc_pam_start(pam_handle_t **pamh, char *user)
}
#endif
#ifdef PAM_TTY
DEBUG(4,("PAM: setting tty\n"));
pam_error = pam_set_item(*pamh, PAM_TTY, "samba");
if (!pam_error_handler(*pamh, pam_error, "set tty failed", 0)) {
proc_pam_end(*pamh);
@ -272,6 +273,7 @@ static BOOL pam_account(pam_handle_t *pamh, char * user, char * password)
* exporting an AFS cell, be able to /write/ to this cell.
*/
DEBUG(4,("PAM: Account Management SetCredentials for User: %s\n", user));
pam_error = pam_setcred(pamh, (PAM_ESTABLISH_CRED|PAM_SILENT));
if(!pam_error_handler(pamh, pam_error, "Set Credential Failure", 2)) {
proc_pam_end(pamh);