関数 | |
static NTSTATUS | fill_dsrole_dominfo_basic (TALLOC_CTX *ctx, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **info) |
NTSTATUS | _dsrole_get_primary_dominfo (pipes_struct *p, DS_Q_GETPRIMDOMINFO *q_u, DS_R_GETPRIMDOMINFO *r_u) |
static NTSTATUS fill_dsrole_dominfo_basic | ( | TALLOC_CTX * | ctx, | |
DSROLE_PRIMARY_DOMAIN_INFO_BASIC ** | info | |||
) | [static] |
srv_lsa_ds_nt.c の 36 行で定義されています。
参照先 DSROLE_PRIMARY_DOMAIN_INFO_BASIC::dns_domain・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::dnsname_ptr・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::domain_guid・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::flags・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::forest_domain・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::forestname_ptr・get_global_sam_name()・init_unistr2()・lp_workgroup()・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::machine_role・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::netbios_domain・DSROLE_PRIMARY_DOMAIN_INFO_BASIC::netbios_ptr・ROLE_DOMAIN_BDC・ROLE_DOMAIN_MEMBER・ROLE_DOMAIN_PDC・ROLE_STANDALONE・SEC_ADS・secrets_fetch_domain_guid()・strlower_m()・UNI_STR_TERMINATE.
参照元 _dsrole_get_primary_dominfo().
00037 { 00038 DSROLE_PRIMARY_DOMAIN_INFO_BASIC *basic; 00039 const char *netbios_domain = ""; 00040 fstring dnsdomain; 00041 00042 DEBUG(10,("fill_dsrole_dominfo_basic: enter\n")); 00043 00044 if ( !(basic = TALLOC_ZERO_P(ctx, DSROLE_PRIMARY_DOMAIN_INFO_BASIC)) ) { 00045 DEBUG(0,("fill_dsrole_dominfo_basic: FATAL error! talloc_xero() failed\n")); 00046 return NT_STATUS_NO_MEMORY; 00047 } 00048 00049 switch ( lp_server_role() ) { 00050 case ROLE_STANDALONE: 00051 basic->machine_role = DSROLE_STANDALONE_SRV; 00052 basic->netbios_ptr = 1; 00053 netbios_domain = get_global_sam_name(); 00054 break; 00055 case ROLE_DOMAIN_MEMBER: 00056 basic->netbios_ptr = 1; 00057 netbios_domain = lp_workgroup(); 00058 basic->machine_role = DSROLE_DOMAIN_MEMBER_SRV; 00059 break; 00060 case ROLE_DOMAIN_BDC: 00061 basic->netbios_ptr = 1; 00062 netbios_domain = get_global_sam_name(); 00063 basic->machine_role = DSROLE_BDC; 00064 break; 00065 case ROLE_DOMAIN_PDC: 00066 basic->netbios_ptr = 1; 00067 netbios_domain = get_global_sam_name(); 00068 basic->machine_role = DSROLE_PDC; 00069 break; 00070 } 00071 00072 /* always set netbios name */ 00073 00074 init_unistr2( &basic->netbios_domain, netbios_domain, UNI_STR_TERMINATE); 00075 00076 if ( secrets_fetch_domain_guid( lp_workgroup(), &basic->domain_guid ) ) 00077 basic->flags |= DSROLE_PRIMARY_DOMAIN_GUID_PRESENT; 00078 00079 /* fill in some additional fields if we are a member of an AD domain */ 00080 00081 if ( lp_security() == SEC_ADS ) { 00082 fstrcpy( dnsdomain, lp_realm() ); 00083 strlower_m( dnsdomain ); 00084 00085 basic->dnsname_ptr = 1; 00086 init_unistr2( &basic->dns_domain, dnsdomain, UNI_STR_TERMINATE); 00087 00088 /* FIXME!! We really should fill in the correct forest 00089 name. Should get this information from winbindd. */ 00090 basic->forestname_ptr = 1; 00091 init_unistr2( &basic->forest_domain, dnsdomain, UNI_STR_TERMINATE); 00092 } else { 00093 /* security = domain should not fill in the dns or 00094 forest name */ 00095 basic->dnsname_ptr = 0; 00096 basic->forestname_ptr = 0; 00097 } 00098 00099 *info = basic; 00100 00101 return NT_STATUS_OK; 00102 }
NTSTATUS _dsrole_get_primary_dominfo | ( | pipes_struct * | p, | |
DS_Q_GETPRIMDOMINFO * | q_u, | |||
DS_R_GETPRIMDOMINFO * | r_u | |||
) |
srv_lsa_ds_nt.c の 108 行で定義されています。
参照先 DS_DOMINFO_CTR::basic・fill_dsrole_dominfo_basic()・DS_R_GETPRIMDOMINFO::info・DS_R_GETPRIMDOMINFO::level・DS_Q_GETPRIMDOMINFO::level・level・pipes_struct::mem_ctx・DS_R_GETPRIMDOMINFO::ptr・result.
参照元 api_dsrole_get_primary_dominfo().
00109 { 00110 NTSTATUS result = NT_STATUS_OK; 00111 uint32 level = q_u->level; 00112 00113 switch ( level ) { 00114 00115 case DsRolePrimaryDomainInfoBasic: 00116 r_u->level = DsRolePrimaryDomainInfoBasic; 00117 r_u->ptr = 1; 00118 result = fill_dsrole_dominfo_basic( p->mem_ctx, &r_u->info.basic ); 00119 break; 00120 00121 default: 00122 DEBUG(0,("_dsrole_get_primary_dominfo: Unsupported info level [%d]!\n", 00123 level)); 00124 result = NT_STATUS_INVALID_LEVEL; 00125 } 00126 00127 return result; 00128 }