RPC_SAMR_OBJ = rpc_server/srv_samr_nt.o \
rpc_server/srv_samr_util.o \
+ rpc_server/srv_samr_chgpasswd.o \
librpc/gen_ndr/srv_samr.o
RPC_INITSHUTDOWN_OBJ = librpc/gen_ndr/srv_initshutdown.o rpc_server/srv_initshutdown_nt.o
BUILDOPT_OBJ = smbd/build_options.o
-SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \
+SMBD_OBJ_SRV = smbd/files.o smbd/connection.o \
smbd/utmp.o smbd/session.o smbd/map_username.o \
smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o \
smbd/share_access.o smbd/fileio.o \
auth/server_info_sam.o \
auth/user_info.o \
auth/pampass.o \
- smbd/chgpasswd.o \
+ rpc_server/srv_samr_chgpasswd.o \
../nsswitch/libwbclient/wb_reqtrans.o
WINBINDD_OBJ = \
NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine);
-/* The following definitions come from smbd/chgpasswd.c */
-
-bool chgpasswd(const char *name, const struct passwd *pass,
- const char *oldpass, const char *newpass, bool as_root);
-NTSTATUS pass_oem_change(char *user,
- uchar password_encrypted_with_lm_hash[516],
- const uchar old_lm_hash_encrypted[16],
- uchar password_encrypted_with_nt_hash[516],
- const uchar old_nt_hash_encrypted[16],
- enum samPwdChangeReason *reject_reason);
-NTSTATUS check_password_complexity(const char *username,
- const char *password,
- enum samPwdChangeReason *samr_reject_reason);
-
/* The following definitions come from smbd/close.c */
void set_close_write_time(struct files_struct *fsp, struct timespec ts);
-/*
+/*
Unix SMB/CIFS implementation.
Samba utility functions
Copyright (C) Andrew Tridgell 1992-1998
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
#include "../lib/crypto/arcfour.h"
+#include "rpc_server/srv_samr_util.h"
#if ALLOW_CHANGE_PASSWORD
stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
stermios.c_lflag |= ICANON;
#ifdef ONLCR
- stermios.c_oflag &= ~(ONLCR);
+ stermios.c_oflag &= ~(ONLCR);
#endif
if (tcsetattr(0, TCSANOW, &stermios) < 0)
{
#else /* ALLOW_CHANGE_PASSWORD */
-bool chgpasswd(const char *name, const struct passwd *pass,
+bool chgpasswd(const char *name, const struct passwd *pass,
const char *oldpass, const char *newpass, bool as_root)
{
DEBUG(0, ("chgpasswd: Unix Password changing not compiled in (user=%s)\n", name));
password_encrypted = password_encrypted_with_lm_hash;
encryption_key = lanman_pw;
} else if (nt_pass_set) {
- DEBUG(1, ("NT password change supplied for user %s, but we have no NT password to check it with\n",
+ DEBUG(1, ("NT password change supplied for user %s, but we have no NT password to check it with\n",
user));
return NT_STATUS_WRONG_PASSWORD;
} else if (lm_pass_set) {
if (lp_lanman_auth()) {
- DEBUG(1, ("LM password change supplied for user %s, but we have no LanMan password to check it with\n",
+ DEBUG(1, ("LM password change supplied for user %s, but we have no LanMan password to check it with\n",
user));
} else {
- DEBUG(1, ("LM password change supplied for user %s, but we have disabled LanMan authentication\n",
+ DEBUG(1, ("LM password change supplied for user %s, but we have disabled LanMan authentication\n",
user));
}
return NT_STATUS_WRONG_PASSWORD;
} else {
- DEBUG(1, ("password change requested for user %s, but no password supplied!\n",
+ DEBUG(1, ("password change requested for user %s, but no password supplied!\n",
user));
return NT_STATUS_WRONG_PASSWORD;
}
}
if (pdb_get_account_policy(PDB_POLICY_MIN_PASSWORD_LEN, &min_len) && (str_charnum(new_passwd) < min_len)) {
- DEBUG(1, ("user %s cannot change password - password too short\n",
+ DEBUG(1, ("user %s cannot change password - password too short\n",
username));
DEBUGADD(1, (" account policy min password len = %d\n", min_len));
if (samr_reject_reason) {
struct samr_UserInfo25 *from);
void copy_id26_to_sam_passwd(struct samu *to,
struct samr_UserInfo26 *from);
+
+/* The following definitions come from rpc_server/srv_samr_chgpasswd.c */
+
+bool chgpasswd(const char *name, const struct passwd *pass,
+ const char *oldpass, const char *newpass, bool as_root);
+NTSTATUS pass_oem_change(char *user,
+ uchar password_encrypted_with_lm_hash[516],
+ const uchar old_lm_hash_encrypted[16],
+ uchar password_encrypted_with_nt_hash[516],
+ const uchar old_nt_hash_encrypted[16],
+ enum samPwdChangeReason *reject_reason);
+NTSTATUS check_password_complexity(const char *username,
+ const char *password,
+ enum samPwdChangeReason *samr_reject_reason);