Changeset 740 for vendor/current/source4/param/util.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source4/param/util.c
r414 r740 36 36 37 37 38 bool lp _is_mydomain(struct loadparm_context *lp_ctx,38 bool lpcfg_is_mydomain(struct loadparm_context *lp_ctx, 39 39 const char *domain) 40 40 { 41 return strequal(lp _workgroup(lp_ctx), domain);42 } 43 44 bool lp _is_my_domain_or_realm(struct loadparm_context *lp_ctx,41 return strequal(lpcfg_workgroup(lp_ctx), domain); 42 } 43 44 bool lpcfg_is_my_domain_or_realm(struct loadparm_context *lp_ctx, 45 45 const char *domain) 46 46 { 47 return strequal(lp _workgroup(lp_ctx), domain) ||48 strequal(lp _realm(lp_ctx), domain);47 return strequal(lpcfg_workgroup(lp_ctx), domain) || 48 strequal(lpcfg_realm(lp_ctx), domain); 49 49 } 50 50 … … 53 53 netbios aliases. do a case insensitive match 54 54 */ 55 bool lp _is_myname(struct loadparm_context *lp_ctx, const char *name)55 bool lpcfg_is_myname(struct loadparm_context *lp_ctx, const char *name) 56 56 { 57 57 const char **aliases; 58 58 int i; 59 59 60 if (strcasecmp(name, lp _netbios_name(lp_ctx)) == 0) {60 if (strcasecmp(name, lpcfg_netbios_name(lp_ctx)) == 0) { 61 61 return true; 62 62 } 63 63 64 aliases = lp _netbios_aliases(lp_ctx);64 aliases = lpcfg_netbios_aliases(lp_ctx); 65 65 for (i=0; aliases && aliases[i]; i++) { 66 66 if (strcasecmp(name, aliases[i]) == 0) { … … 87 87 } 88 88 89 dname = talloc_strdup(mem_ctx, lp _lockdir(lp_ctx));89 dname = talloc_strdup(mem_ctx, lpcfg_lockdir(lp_ctx)); 90 90 trim_string(dname,"","/"); 91 91 … … 113 113 { 114 114 char *fname, *config_dir, *p; 115 config_dir = talloc_strdup(mem_ctx, lp _configfile(lp_ctx));115 config_dir = talloc_strdup(mem_ctx, lpcfg_configfile(lp_ctx)); 116 116 if (config_dir == NULL) { 117 117 config_dir = talloc_strdup(mem_ctx, lp_default_path()); … … 151 151 return talloc_strdup(mem_ctx, name); 152 152 } 153 fname = talloc_asprintf(mem_ctx, "%s/%s", lp _private_dir(lp_ctx), name);153 fname = talloc_asprintf(mem_ctx, "%s/%s", lpcfg_private_dir(lp_ctx), name); 154 154 return fname; 155 155 } … … 161 161 */ 162 162 char *smbd_tmp_path(TALLOC_CTX *mem_ctx, 163 struct loadparm_context *lp_ctx, 163 struct loadparm_context *lp_ctx, 164 164 const char *name) 165 165 { … … 270 270 const char *name) 271 271 { 272 const char *env_moduledir = getenv("LD_SAMBA_MODULE_PATH");273 272 return talloc_asprintf(mem_ctx, "%s/%s", 274 env_moduledir?env_moduledir:lp_modulesdir(lp_ctx),273 lpcfg_modulesdir(lp_ctx), 275 274 name); 276 275 } … … 294 293 } 295 294 296 const char *lp _messaging_path(TALLOC_CTX *mem_ctx,295 const char *lpcfg_messaging_path(TALLOC_CTX *mem_ctx, 297 296 struct loadparm_context *lp_ctx) 298 297 { 299 return smbd_tmp_path(mem_ctx, lp_ctx, "messaging"); 300 } 301 302 struct smb_iconv_convenience *smb_iconv_convenience_init_lp(TALLOC_CTX *mem_ctx, 303 struct loadparm_context *lp_ctx) 304 { 305 return smb_iconv_convenience_init(mem_ctx, lp_dos_charset(lp_ctx), 306 lp_unix_charset(lp_ctx), 307 lp_parm_bool(lp_ctx, NULL, "iconv", "native", true)); 308 } 309 310 311 const char *lp_sam_name(struct loadparm_context *lp_ctx) 312 { 313 switch (lp_server_role(lp_ctx)) { 298 return smbd_tmp_path(mem_ctx, lp_ctx, "msg"); 299 } 300 301 struct smb_iconv_convenience *smb_iconv_convenience_reinit_lp(TALLOC_CTX *mem_ctx, 302 struct loadparm_context *lp_ctx, 303 struct smb_iconv_convenience *old_ic) 304 { 305 return smb_iconv_convenience_reinit(mem_ctx, lpcfg_dos_charset(lp_ctx), 306 lpcfg_unix_charset(lp_ctx), 307 lpcfg_display_charset(lp_ctx), 308 lpcfg_parm_bool(lp_ctx, NULL, "iconv", "native", true), 309 old_ic); 310 } 311 312 313 const char *lpcfg_sam_name(struct loadparm_context *lp_ctx) 314 { 315 switch (lpcfg_server_role(lp_ctx)) { 314 316 case ROLE_DOMAIN_CONTROLLER: 315 return lp _workgroup(lp_ctx);317 return lpcfg_workgroup(lp_ctx); 316 318 default: 317 return lp _netbios_name(lp_ctx);318 } 319 } 320 319 return lpcfg_netbios_name(lp_ctx); 320 } 321 } 322
Note:
See TracChangeset
for help on using the changeset viewer.