blob: f34414507dd4284abc446b7dfd671661a28a49b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$NetBSD: patch-ag,v 1.7 2007/10/28 07:28:46 taca Exp $
--- passdb/passdb.c.orig 2007-05-24 00:29:17.000000000 +0900
+++ passdb/passdb.c
@@ -135,6 +135,7 @@ static NTSTATUS samu_set_unix_internal(s
const char *guest_account = lp_guestaccount();
const char *domain = global_myname();
uint32 urid;
+ char *gecos;
if ( !pwd ) {
return NT_STATUS_NO_SUCH_USER;
@@ -143,7 +144,9 @@ static NTSTATUS samu_set_unix_internal(s
/* Basic properties based upon the Unix account information */
pdb_set_username(user, pwd->pw_name, PDB_SET);
- pdb_set_fullname(user, pwd->pw_gecos, PDB_SET);
+ gecos = passwd_expand_gecos(pwd);
+ pdb_set_fullname(user, gecos, PDB_SET);
+ SAFE_FREE(gecos);
pdb_set_domain (user, get_global_sam_name(), PDB_DEFAULT);
#if 0
/* This can lead to a primary group of S-1-22-2-XX which
|