*/
#include "includes.h"
+#include "system/passwd.h"
#include "libnet/libnet_dssync.h"
#include "libnet/libnet_samsync.h"
#include "../libcli/security/security.h"
#include "../libds/common/flags.h"
#include "../librpc/gen_ndr/ndr_drsuapi.h"
#include "dbwrap.h"
+#include "../libds/common/flag_mapping.h"
+#include "passdb.h"
/****************************************************************
****************************************************************/
pdb_sethexhours(oldstr, pdb_get_hours(account));
pdb_sethexhours(newstr, logonHours.data);
if (!strequal(oldstr, newstr)) {
- pdb_set_hours(account, logonHours.data, PDB_CHANGED);
+ pdb_set_hours(account, logonHours.data,
+ logonHours.length, PDB_CHANGED);
}
}
map.sid_name_use = SID_NAME_ALIAS;
}
- fstrcpy(map.nt_name, name);
+ strlcpy(map.nt_name, name, sizeof(map.nt_name));
if (description) {
- fstrcpy(map.comment, comment);
+ strlcpy(map.comment, comment, sizeof(map.comment));
} else {
- fstrcpy(map.comment, "");
+ strlcpy(map.comment, "", sizeof(map.comment));
}
if (insert)
map.gid = grp->gr_gid;
map.sid = group_sid;
map.sid_name_use = SID_NAME_DOM_GRP;
- fstrcpy(map.nt_name, name);
+ strlcpy(map.nt_name, name, sizeof(map.nt_name));
if (description) {
- fstrcpy(map.comment, comment);
+ strlcpy(map.comment, comment, sizeof(map.comment));
} else {
- fstrcpy(map.comment, "");
+ strlcpy(map.comment, "", sizeof(map.comment));
}
if (insert)