1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Fix bug 6336: "net groupmap set" segfaults

This commit is contained in:
Volker Lendecke 2009-05-07 10:09:32 +02:00
parent 6f7cd213dd
commit 974223b927

View File

@ -619,11 +619,13 @@ static int net_groupmap_set(struct net_context *c, int argc, const char **argv)
/* The case (opt_domaingroup && opt_localgroup) was tested for above */ /* The case (opt_domaingroup && opt_localgroup) was tested for above */
if (strlen(c->opt_comment) > 0) if ((c->opt_comment != NULL) && (strlen(c->opt_comment) > 0)) {
fstrcpy(map.comment, c->opt_comment); fstrcpy(map.comment, c->opt_comment);
}
if (strlen(c->opt_newntname) > 0) if ((c->opt_newntname != NULL) && (strlen(c->opt_newntname) > 0)) {
fstrcpy(map.nt_name, c->opt_newntname); fstrcpy(map.nt_name, c->opt_newntname);
}
if (grp != NULL) if (grp != NULL)
map.gid = grp->gr_gid; map.gid = grp->gr_gid;