Fix bug 6449
authorVolker Lendecke <vl@samba.org>
Mon, 8 Jun 2009 07:45:21 +0000 (09:45 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Jun 2009 14:17:59 +0000 (16:17 +0200)
Thanks to TAKAHASHI Motonobu <monyo@samba.gr.jp> for reporting!
(cherry picked from commit a956e36ceb22072cd4ea755ce9b4457896af4b14)

source/utils/net_rap.c

index dd757abd1ac5cf5ff460f4f69753cc8eced410c7..573f18db60ec93f7e63be0032098c6e0bacd2a4a 100644 (file)
@@ -822,7 +822,7 @@ static int rap_user_add(struct net_context *c, int argc, const char **argv)
 
        userinfo.userflags = c->opt_flags;
        userinfo.reserved1 = '\0';
-       userinfo.comment = smb_xstrdup(c->opt_comment);
+        userinfo.comment = smb_xstrdup(c->opt_comment ? c->opt_comment : "");
        userinfo.priv = 1;
        userinfo.home_dir = NULL;
        userinfo.logon_script = NULL;