mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
Delete OriginalDir stuff.
(This used to be commit 3d0f1845c8cefccfabcfd35694264c1e5f52c3af)
This commit is contained in:
parent
dd4c0901b6
commit
2a1dbb0acd
@ -412,7 +412,8 @@ static BOOL chat_with_program(char *passwordprogram, char *name,
|
|||||||
alarm(20);
|
alarm(20);
|
||||||
|
|
||||||
if (as_root)
|
if (as_root)
|
||||||
become_root(False);
|
become_root();
|
||||||
|
|
||||||
DEBUG(3,
|
DEBUG(3,
|
||||||
("Dochild for user %s (uid=%d,gid=%d)\n", name,
|
("Dochild for user %s (uid=%d,gid=%d)\n", name,
|
||||||
(int)getuid(), (int)getgid()));
|
(int)getuid(), (int)getgid()));
|
||||||
@ -420,6 +421,9 @@ static BOOL chat_with_program(char *passwordprogram, char *name,
|
|||||||
dochild(master, slavedev, name, passwordprogram,
|
dochild(master, slavedev, name, passwordprogram,
|
||||||
as_root);
|
as_root);
|
||||||
|
|
||||||
|
if (as_root)
|
||||||
|
unbecome_root();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The child should never return from dochild() ....
|
* The child should never return from dochild() ....
|
||||||
*/
|
*/
|
||||||
@ -546,9 +550,9 @@ BOOL check_lanman_password(char *user, uchar * pass1,
|
|||||||
|
|
||||||
*psmbpw = NULL;
|
*psmbpw = NULL;
|
||||||
|
|
||||||
become_root(0);
|
become_root();
|
||||||
smbpw = getsmbpwnam(user);
|
smbpw = getsmbpwnam(user);
|
||||||
unbecome_root(0);
|
unbecome_root();
|
||||||
|
|
||||||
if (smbpw == NULL)
|
if (smbpw == NULL)
|
||||||
{
|
{
|
||||||
@ -644,9 +648,9 @@ BOOL change_lanman_password(struct smb_passwd *smbpw, uchar * pass1,
|
|||||||
smbpw->smb_nt_passwd = NULL; /* We lose the NT hash. Sorry. */
|
smbpw->smb_nt_passwd = NULL; /* We lose the NT hash. Sorry. */
|
||||||
|
|
||||||
/* Now write it into the file. */
|
/* Now write it into the file. */
|
||||||
become_root(0);
|
become_root();
|
||||||
ret = mod_smbpwd_entry(smbpw, False);
|
ret = mod_smbpwd_entry(smbpw, False);
|
||||||
unbecome_root(0);
|
unbecome_root();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -713,9 +717,9 @@ BOOL check_oem_password(char *user,
|
|||||||
|
|
||||||
BOOL nt_pass_set = (ntdata != NULL && nthash != NULL);
|
BOOL nt_pass_set = (ntdata != NULL && nthash != NULL);
|
||||||
|
|
||||||
become_root(False);
|
become_root();
|
||||||
*psmbpw = smbpw = getsmbpwnam(user);
|
*psmbpw = smbpw = getsmbpwnam(user);
|
||||||
unbecome_root(False);
|
unbecome_root();
|
||||||
|
|
||||||
if (smbpw == NULL)
|
if (smbpw == NULL)
|
||||||
{
|
{
|
||||||
@ -878,9 +882,9 @@ BOOL change_oem_password(struct smb_passwd *smbpw, char *new_passwd,
|
|||||||
smbpw->smb_nt_passwd = new_nt_p16;
|
smbpw->smb_nt_passwd = new_nt_p16;
|
||||||
|
|
||||||
/* Now write it into the file. */
|
/* Now write it into the file. */
|
||||||
become_root(0);
|
become_root();
|
||||||
ret = mod_smbpwd_entry(smbpw, override);
|
ret = mod_smbpwd_entry(smbpw, override);
|
||||||
unbecome_root(0);
|
unbecome_root();
|
||||||
|
|
||||||
memset(new_passwd, '\0', strlen(new_passwd));
|
memset(new_passwd, '\0', strlen(new_passwd));
|
||||||
|
|
||||||
@ -897,9 +901,9 @@ BOOL check_plaintext_password(char *user, char *old_passwd,
|
|||||||
struct smb_passwd *smbpw = NULL;
|
struct smb_passwd *smbpw = NULL;
|
||||||
uchar old_pw[16], old_ntpw[16];
|
uchar old_pw[16], old_ntpw[16];
|
||||||
|
|
||||||
become_root(False);
|
become_root();
|
||||||
*psmbpw = smbpw = getsmbpwnam(user);
|
*psmbpw = smbpw = getsmbpwnam(user);
|
||||||
unbecome_root(False);
|
unbecome_root();
|
||||||
|
|
||||||
if (smbpw == NULL)
|
if (smbpw == NULL)
|
||||||
{
|
{
|
||||||
|
@ -270,9 +270,9 @@ int file_utime(connection_struct *conn, char *fname, struct utimbuf *times)
|
|||||||
in_group(sb.st_gid,current_user.gid,
|
in_group(sb.st_gid,current_user.gid,
|
||||||
current_user.ngroups,current_user.groups)))) {
|
current_user.ngroups,current_user.groups)))) {
|
||||||
/* We are allowed to become root and change the filetime. */
|
/* We are allowed to become root and change the filetime. */
|
||||||
become_root(False);
|
become_root();
|
||||||
ret = conn->vfs_ops.utime(dos_to_unix(fname, False), times);
|
ret = conn->vfs_ops.utime(dos_to_unix(fname, False), times);
|
||||||
unbecome_root(False);
|
unbecome_root();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,10 +329,10 @@ static BOOL update_smbpassword_file(char *user, char *password)
|
|||||||
struct smb_passwd *smbpw;
|
struct smb_passwd *smbpw;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
become_root(0);
|
become_root();
|
||||||
smbpw = getsmbpwnam(user);
|
smbpw = getsmbpwnam(user);
|
||||||
unbecome_root(0);
|
unbecome_root();
|
||||||
|
|
||||||
if(smbpw == NULL) {
|
if(smbpw == NULL) {
|
||||||
DEBUG(0,("getsmbpwnam returned NULL\n"));
|
DEBUG(0,("getsmbpwnam returned NULL\n"));
|
||||||
return False;
|
return False;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user