Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/param/util.c

    r414 r740  
    3636
    3737
    38 bool lp_is_mydomain(struct loadparm_context *lp_ctx,
     38bool lpcfg_is_mydomain(struct loadparm_context *lp_ctx,
    3939                             const char *domain)
    4040{
    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
     44bool lpcfg_is_my_domain_or_realm(struct loadparm_context *lp_ctx,
    4545                             const char *domain)
    4646{
    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);
    4949}
    5050
     
    5353  netbios aliases. do a case insensitive match
    5454*/
    55 bool lp_is_myname(struct loadparm_context *lp_ctx, const char *name)
     55bool lpcfg_is_myname(struct loadparm_context *lp_ctx, const char *name)
    5656{
    5757        const char **aliases;
    5858        int i;
    5959
    60         if (strcasecmp(name, lp_netbios_name(lp_ctx)) == 0) {
     60        if (strcasecmp(name, lpcfg_netbios_name(lp_ctx)) == 0) {
    6161                return true;
    6262        }
    6363
    64         aliases = lp_netbios_aliases(lp_ctx);
     64        aliases = lpcfg_netbios_aliases(lp_ctx);
    6565        for (i=0; aliases && aliases[i]; i++) {
    6666                if (strcasecmp(name, aliases[i]) == 0) {
     
    8787        }
    8888
    89         dname = talloc_strdup(mem_ctx, lp_lockdir(lp_ctx));
     89        dname = talloc_strdup(mem_ctx, lpcfg_lockdir(lp_ctx));
    9090        trim_string(dname,"","/");
    9191       
     
    113113{
    114114        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));
    116116        if (config_dir == NULL) {
    117117                config_dir = talloc_strdup(mem_ctx, lp_default_path());
     
    151151                return talloc_strdup(mem_ctx, name);
    152152        }
    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);
    154154        return fname;
    155155}
     
    161161*/
    162162char *smbd_tmp_path(TALLOC_CTX *mem_ctx,
    163                              struct loadparm_context *lp_ctx, 
     163                             struct loadparm_context *lp_ctx,
    164164                             const char *name)
    165165{
     
    270270                          const char *name)
    271271{
    272         const char *env_moduledir = getenv("LD_SAMBA_MODULE_PATH");
    273272        return talloc_asprintf(mem_ctx, "%s/%s",
    274                                env_moduledir?env_moduledir:lp_modulesdir(lp_ctx),
     273                               lpcfg_modulesdir(lp_ctx),
    275274                               name);
    276275}
     
    294293}
    295294
    296 const char *lp_messaging_path(TALLOC_CTX *mem_ctx,
     295const char *lpcfg_messaging_path(TALLOC_CTX *mem_ctx,
    297296                                       struct loadparm_context *lp_ctx)
    298297{
    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
     301struct 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
     313const char *lpcfg_sam_name(struct loadparm_context *lp_ctx)
     314{
     315        switch (lpcfg_server_role(lp_ctx)) {
    314316        case ROLE_DOMAIN_CONTROLLER:
    315                 return lp_workgroup(lp_ctx);
     317                return lpcfg_workgroup(lp_ctx);
    316318        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.