Changeset 18454


Ignore:
Timestamp:
02/13/12 18:50:44 (16 months ago)
Author:
BrainSlayer
Message:

Update

Location:
src/router/samba36/source3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/router/samba36/source3/lib/netapi/serverinfo.c

    r18451 r18454  
    558558        } 
    559559 
    560         if (!lp_config_backend_is_registry()) { 
     560#ifdef REGISTRY_BACKEND 
     561        if (!lp_config_backend_is_registry()) 
     562#endif 
     563        { 
    561564                libnetapi_set_error_string(ctx, 
    562565                        "Configuration manipulation requested but not " 
  • src/router/samba36/source3/lib/smbconf/smbconf_init.c

    r18451 r18454  
    6969        } 
    7070 
     71#ifdef REGISTRY_BACKEND 
    7172        if (strequal(backend, "registry") || strequal(backend, "reg")) { 
    7273                err = smbconf_init_reg(mem_ctx, conf_ctx, path); 
    73         } else if (strequal(backend, "file") || strequal(backend, "txt")) { 
     74        } else 
     75#endif 
     76        if (strequal(backend, "file") || strequal(backend, "txt")) { 
    7477                err = smbconf_init_txt(mem_ctx, conf_ctx, path); 
    7578        } else if (sep == NULL) { 
  • src/router/samba36/source3/librpc/rpc/rpc_common.c

    r18451 r18454  
    101101        } 
    102102#endif 
     103#ifdef SAMR_SUPPORT 
    103104        if (!smb_register_ndr_interface(&ndr_table_samr)) { 
    104105                return false; 
    105106        } 
     107#endif 
    106108#ifdef NETLOGON_SUPPORT 
    107109        if (!smb_register_ndr_interface(&ndr_table_netlogon)) { 
     
    109111        } 
    110112#endif 
    111 #ifdef SRVSVC_SUPPORT 
    112113        if (!smb_register_ndr_interface(&ndr_table_srvsvc)) { 
    113114                return false; 
    114115        } 
    115 #endif 
    116 #ifdef WKSSVC_SUPPORT 
    117116        if (!smb_register_ndr_interface(&ndr_table_wkssvc)) { 
    118117                return false; 
    119118        } 
    120 #endif 
    121119#ifdef WINREG_SUPPORT 
    122120        if (!smb_register_ndr_interface(&ndr_table_winreg)) { 
  • src/router/samba36/source3/rpc_server/rpc_ep_setup.c

    r18451 r18454  
    460460#endif 
    461461 
    462 #ifdef SRVSVC_SUPPORT 
    463462static bool srvsvc_init_cb(void *ptr) 
    464463{ 
     
    509508        return true; 
    510509} 
    511 #endif 
    512510 
    513511static bool lsarpc_init_cb(void *ptr) 
     
    560558} 
    561559 
     560#ifdef SAMR_SUPPORT 
    562561static bool samr_init_cb(void *ptr) 
    563562{ 
     
    608607        return true; 
    609608} 
     609#endif 
    610610 
    611611#ifdef NETLOGON_SUPPORT 
     
    987987#endif 
    988988 
    989 #ifdef WKSSVC_SUPPORT 
    990989static bool wkssvc_init_cb(void *ptr) 
    991990{ 
     
    10351034        return true; 
    10361035} 
    1037 #endif 
    10381036 
    10391037bool dcesrv_ep_setup(struct tevent_context *ev_ctx, 
     
    11011099#endif 
    11021100 
    1103 #ifdef SRVSVC_SUPPORT 
    11041101        srvsvc_cb.init         = srvsvc_init_cb; 
    11051102        srvsvc_cb.shutdown     = NULL; 
     
    11081105                return false; 
    11091106        } 
    1110 #endif 
     1107 
    11111108 
    11121109        lsarpc_cb.init         = lsarpc_init_cb; 
     
    11171114        } 
    11181115 
     1116#ifdef SAMR_SUPPORT 
    11191117        samr_cb.init         = samr_init_cb; 
    11201118        samr_cb.shutdown     = NULL; 
     
    11231121                return false; 
    11241122        } 
     1123#endif 
    11251124 
    11261125#ifdef NETLOGON_SUPPORT 
     
    12131212#endif 
    12141213 
    1215 #ifdef WKSSVC_SUPPORT 
    12161214        wkssvc_cb.init         = wkssvc_init_cb; 
    12171215        wkssvc_cb.shutdown     = NULL; 
     
    12201218                return false; 
    12211219        } 
    1222 #endif 
    12231220 
    12241221        return true; 
  • src/router/samba36/source3/rpc_server/wkssvc/srv_wkssvc_nt.c

    r18451 r18454  
    821821        struct security_token *token = p->session_info->security_token; 
    822822 
     823#ifndef NETLOGON_SUPPORT 
     824        return WERR_NOT_SUPPORTED; 
     825#endif 
     826 
    823827        if (!r->in.domain_name) { 
    824828                return WERR_INVALID_PARAM; 
     
    898902        struct security_token *token = p->session_info->security_token; 
    899903 
     904#ifndef NETLOGON_SUPPORT 
     905        return WERR_NOT_SUPPORTED; 
     906#endif 
     907 
    900908        if (!r->in.account || !r->in.encrypted_password) { 
    901909                return WERR_INVALID_PARAM; 
  • src/router/samba36/source3/rpcclient/rpcclient.c

    r18451 r18454  
    624624        lsarpc_commands, 
    625625        ds_commands, 
     626#ifdef SAMR_SUPPORT 
    626627        samr_commands, 
     628#endif 
    627629#ifdef PRINTER_SUPPORT 
    628630        spoolss_commands, 
     
    631633        netlogon_commands, 
    632634#endif 
    633 #ifdef SRVSVC_SUPPORT 
    634635        srvsvc_commands, 
    635 #endif 
    636636#ifdef DFS_SUPPORT 
    637637        dfs_commands, 
     
    643643        shutdown_commands, 
    644644        test_commands, 
    645 #ifdef WKSSVC_SUPPORT 
    646645        wkssvc_commands, 
    647 #endif 
    648646#ifdef EXTRA_SERVICES 
    649647        ntsvcs_commands, 
  • src/router/samba36/source3/smbd/lanman.c

    r18451 r18454  
    21982198        struct dcerpc_binding_handle *b; 
    21992199 
    2200 #ifndef SRVSVC_SUPPORT 
    2201         return False; 
    2202 #endif 
    2203  
    22042200        if (!str1 || !str2 || !p) { 
    22052201                return False; 
     
    38233819        WERROR werr; 
    38243820        TALLOC_CTX *mem_ctx = talloc_tos(); 
     3821        struct rpc_pipe_client *cli = NULL; 
     3822        union srvsvc_NetSrvInfo info; 
    38253823        int errcode; 
     3824        struct dcerpc_binding_handle *b; 
    38263825 
    38273826        if (!str1 || !str2 || !p) { 
     
    38863885        p2 = p + struct_len; 
    38873886 
     3887        status = rpc_pipe_open_interface(mem_ctx, &ndr_table_srvsvc.syntax_id, 
     3888                                        conn->session_info, 
     3889                                        &conn->sconn->client_id, 
     3890                                        conn->sconn->msg_ctx, 
     3891                                        &cli); 
     3892        if (!NT_STATUS_IS_OK(status)) { 
     3893                DEBUG(0,("api_RNetServerGetInfo: could not connect to srvsvc: %s\n", 
     3894                          nt_errstr(status))); 
     3895                errcode = W_ERROR_V(ntstatus_to_werror(status)); 
     3896                goto out; 
     3897        } 
     3898 
     3899        b = cli->binding_handle; 
     3900 
     3901        status = dcerpc_srvsvc_NetSrvGetInfo(b, mem_ctx, 
     3902                                             NULL, 
     3903                                             101, 
     3904                                             &info, 
     3905                                             &werr); 
     3906        if (!NT_STATUS_IS_OK(status)) { 
     3907                errcode = W_ERROR_V(ntstatus_to_werror(status)); 
     3908                goto out; 
     3909        } 
     3910        if (!W_ERROR_IS_OK(werr)) { 
     3911                errcode = W_ERROR_V(werr); 
     3912                goto out; 
     3913        } 
     3914 
     3915        if (info.info101 == NULL) { 
     3916                errcode = W_ERROR_V(WERR_INVALID_PARAM); 
     3917                goto out; 
     3918        } 
     3919 
    38883920        if (uLevel != 20) { 
    3889                 srvstr_push(NULL, 0, p, global_myname(), 16, 
     3921                srvstr_push(NULL, 0, p, info.info101->server_name, 16, 
    38903922                        STR_ASCII|STR_UPPER|STR_TERMINATE); 
    3891         } 
     3923        } 
    38923924        p += 16; 
    38933925        if (uLevel > 0) { 
    3894                 SCVAL(p,0,lp_major_announce_version()); 
    3895                 SCVAL(p,1,lp_minor_announce_version()); 
    3896                 SIVAL(p,2,lp_default_server_announce()); 
    3897                 SIVAL(p,6,0); 
     3926                SCVAL(p,0,info.info101->version_major); 
     3927                SCVAL(p,1,info.info101->version_minor); 
     3928                SIVAL(p,2,info.info101->server_type); 
     3929 
     3930                if (mdrcnt == struct_len) { 
     3931                        SIVAL(p,6,0); 
     3932                } else { 
     3933                        SIVAL(p,6,PTR_DIFF(p2,*rdata)); 
     3934                        if (mdrcnt - struct_len <= 0) { 
     3935                                return false; 
     3936                        } 
     3937                        push_ascii(p2, 
     3938                                info.info101->comment, 
     3939                                MIN(mdrcnt - struct_len, 
     3940                                        MAX_SERVER_STRING_LENGTH), 
     3941                                STR_TERMINATE); 
     3942                        p2 = skip_string(*rdata,*rdata_len,p2); 
     3943                        if (!p2) { 
     3944                                return False; 
     3945                        } 
     3946                } 
    38983947        } 
    38993948 
     
    55835632        uint32_t totalentries, resume_handle = 0; 
    55845633        uint32_t count = 0; 
    5585  
    5586 #ifndef SRVSVC_SUPPORT 
    5587         return False; 
    5588 #endif 
    55895634 
    55905635        if (!str1 || !str2 || !p) { 
  • src/router/samba36/source3/smbd/server_exit.c

    r18451 r18454  
    133133 
    134134        if (am_parent) { 
    135 #ifdef WKSSVC_SUPPORT 
    136135                rpc_wkssvc_shutdown(); 
    137 #endif 
    138136#ifdef ACTIVE_DIRECTORY 
    139137                rpc_dssetup_shutdown(); 
     
    155153#endif 
    156154 
    157 #ifdef SRVSVC_SUPPORT 
    158155                rpc_srvsvc_shutdown(); 
    159 #endif 
    160156#ifdef WINREG_SUPPORT 
    161157                rpc_winreg_shutdown(); 
     
    165161                rpc_netlogon_shutdown(); 
    166162#endif 
     163#ifdef SAMR_SUPPORT 
    167164                rpc_samr_shutdown(); 
     165#endif 
    168166                rpc_lsarpc_shutdown(); 
    169167        } 
Note: See TracChangeset for help on using the changeset viewer.