mirror of
https://github.com/samba-team/samba.git
synced 2025-02-05 21:57:51 +03:00
lp_server_role() + use in srv_reg.
This commit is contained in:
parent
9f02ed6ccf
commit
82e47e268c
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,7 @@
|
||||
|
||||
#define False (0)
|
||||
#define True (1)
|
||||
#define Auto (2)
|
||||
|
||||
#ifndef _BOOL
|
||||
typedef int BOOL;
|
||||
@ -1461,6 +1462,15 @@ enum protocol_types {PROTOCOL_NONE,PROTOCOL_CORE,PROTOCOL_COREPLUS,PROTOCOL_LANM
|
||||
/* security levels */
|
||||
enum security_types {SEC_SHARE,SEC_USER,SEC_SERVER,SEC_DOMAIN};
|
||||
|
||||
/* server roles */
|
||||
enum server_types
|
||||
{
|
||||
ROLE_STANDALONE,
|
||||
ROLE_DOMAIN_MEMBER,
|
||||
ROLE_DOMAIN_BDC,
|
||||
ROLE_DOMAIN_PDC
|
||||
};
|
||||
|
||||
/* printing types */
|
||||
enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
|
||||
PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,PRINT_CUPS};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -186,7 +186,7 @@ static void reg_reply_info(REG_Q_INFO *q_u,
|
||||
prs_struct *rdata)
|
||||
{
|
||||
uint32 status = 0;
|
||||
fstring key = "ServerNT"; /* always a non-PDC */
|
||||
char *key;
|
||||
uint32 type=0x1; /* key type: REG_SZ */
|
||||
|
||||
UNISTR2 uni_key;
|
||||
@ -201,6 +201,25 @@ static void reg_reply_info(REG_Q_INFO *q_u,
|
||||
status = NT_STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
switch (lp_server_role())
|
||||
{
|
||||
case ROLE_DOMAIN_PDC:
|
||||
case ROLE_DOMAIN_BDC:
|
||||
{
|
||||
key = "LanmanNT";
|
||||
break;
|
||||
}
|
||||
case ROLE_STANDALONE:
|
||||
{
|
||||
key = "ServerNT";
|
||||
break;
|
||||
}
|
||||
case ROLE_DOMAIN_MEMBER:
|
||||
{
|
||||
key = "WinNT";
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* This makes the server look like a member server to clients */
|
||||
/* which tells clients that we have our own local user and */
|
||||
/* group databases and helps with ACL support. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user