Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple samba fixes #20

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions libds/common/flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@
#define DS_DOMAIN_FUNCTION_2003 2
#define DS_DOMAIN_FUNCTION_2008 3
#define DS_DOMAIN_FUNCTION_2008_R2 4
#define DS_DOMAIN_FUNCTION_2012 5
#define DS_DOMAIN_FUNCTION_2012_R2 6

/* sa->systemFlags on attributes */
#define DS_FLAG_ATTR_NOT_REPLICATED 0x00000001
Expand Down
6 changes: 5 additions & 1 deletion python/samba/netcmd/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ def dns_connect(server, lp, creds):
if server.lower() == 'localhost':
server = '127.0.0.1'
binding_str = "ncacn_ip_tcp:%s[sign]" % server
dns_conn = dnsserver.dnsserver(binding_str, lp, creds)
try:
dns_conn = dnsserver.dnsserver(binding_str, lp, creds)
except RuntimeError, e:
raise CommandError('Connecting to DNS RPC server %s failed with %s' % (server, e))

return dns_conn


Expand Down
5 changes: 3 additions & 2 deletions python/samba/provision/sambadns.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
from samba.dsdb import (
DS_DOMAIN_FUNCTION_2000,
DS_DOMAIN_FUNCTION_2003,
DS_DOMAIN_FUNCTION_2008_R2
DS_DOMAIN_FUNCTION_2008_R2,
DS_DOMAIN_FUNCTION_2012_R2
)
from samba.descriptor import (
get_domain_descriptor,
Expand Down Expand Up @@ -967,7 +968,7 @@ def is_valid_dns_backend(dns_backend):


def is_valid_os_level(os_level):
return DS_DOMAIN_FUNCTION_2000 <= os_level <= DS_DOMAIN_FUNCTION_2008_R2
return DS_DOMAIN_FUNCTION_2000 <= os_level <= DS_DOMAIN_FUNCTION_2012_R2


def create_dns_legacy(samdb, domainsid, forestdn, dnsadmins_sid):
Expand Down
4 changes: 2 additions & 2 deletions selftest/target/Samba.pm
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ sub get_interface($)
$interfaces{"fileserver"} = 35;

# update lib/socket_wrapper/socket_wrapper.c
# #define MAX_WRAPPED_INTERFACES 32
# if you wish to have more than 32 interfaces
# #define MAX_WRAPPED_INTERFACES 40
# if you wish to have more than 40 interfaces

if (not defined($interfaces{$netbiosname})) {
die();
Expand Down
2 changes: 2 additions & 0 deletions source4/dsdb/pydsdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,8 @@ void initdsdb(void)
ADD_DSDB_FLAG(DS_DOMAIN_FUNCTION_2003);
ADD_DSDB_FLAG(DS_DOMAIN_FUNCTION_2008);
ADD_DSDB_FLAG(DS_DOMAIN_FUNCTION_2008_R2);
ADD_DSDB_FLAG(DS_DOMAIN_FUNCTION_2012);
ADD_DSDB_FLAG(DS_DOMAIN_FUNCTION_2012_R2);

/* nc replica flags */
ADD_DSDB_FLAG(INSTANCE_TYPE_IS_NC_HEAD);
Expand Down
1 change: 0 additions & 1 deletion source4/scripting/bin/samba_upgradedns
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ if __name__ == '__main__':
try:
dn = 'samAccountName=dns-%s,CN=Principals' % hostname
msg = ldbs.secrets.search(expression='(dn=%s)' % dn, attrs=['secret'])
dnssecret = msg[0]['secret'][0]
except IndexError:

logger.info("Adding dns-%s account" % hostname)
Expand Down
5 changes: 4 additions & 1 deletion source4/torture/rpc/lsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -4186,7 +4186,10 @@ static bool check_dom_trust_pw(struct dcerpc_pipe *p,
host,
lpcfg_cldap_port(tctx->lp_ctx),
&dest_addr);
torture_assert_int_equal(tctx, rc, 0, "tsocket_address_inet_from_strings");
torture_assert_int_equal(tctx, rc, 0,
talloc_asprintf(tctx,
"tsocket_address_inet_from_strings failed parsing %s:%d",
host, lpcfg_cldap_port(tctx->lp_ctx)));

/* cldap_socket_init should now know about the dest. address */
status = cldap_socket_init(tctx, NULL, dest_addr, &cldap);
Expand Down