git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcb0706
)
Fix bug 6336: "net groupmap set" segfaults
author
Volker Lendecke
<vl@samba.org>
Thu, 7 May 2009 08:09:32 +0000
(10:09 +0200)
committer
Karolin Seeger
<kseeger@samba.org>
Tue, 26 May 2009 07:38:54 +0000
(09:38 +0200)
(cherry picked from commit
33a53cb98a5f66d56ca1e0633297065f05d12a48
)
source3/utils/net_groupmap.c
patch
|
blob
|
history
diff --git
a/source3/utils/net_groupmap.c
b/source3/utils/net_groupmap.c
index b160d840a07995cc27de803e8bd18d0464def814..0a3a2972e4b0175437f47b18e2d4c0ccb6f9da1d 100644
(file)
--- a/
source3/utils/net_groupmap.c
+++ b/
source3/utils/net_groupmap.c
@@
-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 */
- if (
strlen(c->opt_comment) > 0)
+ if (
(c->opt_comment != NULL) && (strlen(c->opt_comment) > 0)) {
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);
+ }
if (grp != NULL)
map.gid = grp->gr_gid;