Changeset 427 for vendor/current/source3/passdb
- Timestamp:
- Apr 9, 2010, 3:20:58 PM (16 years ago)
- File:
-
- 1 edited
-
vendor/current/source3/passdb/passdb.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/passdb/passdb.c
r414 r427 123 123 } 124 124 125 126 127 128 129 130 131 132 133 134 135 136 125 137 /********************************************************************* 126 138 Initialize a struct samu from a struct passwd including the user … … 133 145 const char *guest_account = lp_guestaccount(); 134 146 const char *domain = global_myname(); 147 135 148 uint32 urid; 136 149 … … 142 155 143 156 pdb_set_username(user, pwd->pw_name, PDB_SET); 144 pdb_set_fullname(user, pwd->pw_gecos, PDB_SET); 157 158 fullname = NULL; 159 160 if (count_commas(pwd->pw_gecos) == 3) { 161 /* 162 * Heuristic: This seems to be a gecos field that has been 163 * edited by chfn(1). Only use the part before the first 164 * comma. Fixes bug 5198. 165 */ 166 fullname = talloc_strndup( 167 talloc_tos(), pwd->pw_gecos, 168 strchr(pwd->pw_gecos, ',') - pwd->pw_gecos); 169 } 170 171 if (fullname != NULL) { 172 pdb_set_fullname(user, fullname, PDB_SET); 173 } else { 174 pdb_set_fullname(user, pwd->pw_gecos, PDB_SET); 175 } 176 TALLOC_FREE(fullname); 177 145 178 pdb_set_domain (user, get_global_sam_name(), PDB_DEFAULT); 146 179 #if 0
Note:
See TracChangeset
for help on using the changeset viewer.
