diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/libnet/libnet_dssync_passdb.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/libnet/libnet_dssync_passdb.c')
-rw-r--r-- | source3/libnet/libnet_dssync_passdb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/libnet/libnet_dssync_passdb.c b/source3/libnet/libnet_dssync_passdb.c index ab347567f1..b8675d3d98 100644 --- a/source3/libnet/libnet_dssync_passdb.c +++ b/source3/libnet/libnet_dssync_passdb.c @@ -20,10 +20,10 @@ #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 "util_tdb.h" #include "dbwrap.h" #include "../libds/common/flag_mapping.h" #include "passdb.h" @@ -106,7 +106,7 @@ static struct dssync_passdb_obj *dssync_search_obj_by_guid(struct dssync_passdb TDB_DATA key; TDB_DATA data; - key = make_tdb_data((const uint8_t *)(void *)guid, + key = make_tdb_data((const uint8_t *)(const void *)guid, sizeof(*guid)); ret = db->fetch(db, talloc_tos(), key, &data); @@ -1531,11 +1531,11 @@ static NTSTATUS handle_alias_object(struct dssync_passdb *pctx, 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) @@ -1636,11 +1636,11 @@ static NTSTATUS handle_group_object(struct dssync_passdb *pctx, 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) |