Changeset 77 for trunk/samba/source/lib/substitute.c
- Timestamp:
- Sep 30, 2007, 3:42:50 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/lib/substitute.c
r1 r77 7 7 This program is free software; you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2of the License, or9 the Free Software Foundation; either version 3 of the License, or 10 10 (at your option) any later version. 11 11 … … 16 16 17 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 along with this program. If not, see <http://www.gnu.org/licenses/>. 20 19 */ 21 20 … … 142 141 } 143 142 144 char* sub_get_smb_name( void )145 {146 return smb_user_name;147 }148 149 143 /******************************************************************* 150 144 Setup the strings used by substitutions. Called per packet. Ensure … … 156 150 current_user_info = *pcui; 157 151 /* The following is safe as current_user_info.smb_name 158 * has already been sanitised in register_ vuid. */152 * has already been sanitised in register_existing_vuid. */ 159 153 fstrcpy(smb_user_name, current_user_info.smb_name); 160 154 } … … 265 259 }; 266 260 267 st ruct api_longvar longvar_table[] = {261 static struct api_longvar longvar_table[] = { 268 262 { "DomainSID", longvar_domainsid }, 269 263 { NULL, NULL } … … 341 335 static char *automount_path(const char *user_name) 342 336 { 343 staticpstring server_path;337 pstring server_path; 344 338 345 339 /* use the passwd entry as the default */ … … 370 364 DEBUG(4,("Home server path: %s\n", server_path)); 371 365 372 return server_path;366 return talloc_strdup(talloc_tos(), server_path); 373 367 } 374 368 … … 381 375 static const char *automount_server(const char *user_name) 382 376 { 383 staticpstring server_name;377 pstring server_name; 384 378 const char *local_machine_name = get_local_machine_name(); 385 379 … … 407 401 DEBUG(4,("Home server: %s\n", server_name)); 408 402 409 return server_name;403 return talloc_strdup(talloc_tos(), server_name); 410 404 } 411 405 … … 454 448 { 455 449 char *b, *p, *s, *r, *a_string; 456 fstring pidstr ;450 fstring pidstr, vnnstr; 457 451 struct passwd *pass; 458 452 const char *local_machine_name = get_local_machine_name(); … … 552 546 case '(': 553 547 a_string = realloc_expand_longvar( a_string, p ); 548 break; 549 case 'V' : 550 slprintf(vnnstr,sizeof(vnnstr)-1, "%u", get_my_vnn()); 551 a_string = realloc_string_sub(a_string, "%V", vnnstr); 554 552 break; 555 553 default:
Note:
See TracChangeset
for help on using the changeset viewer.