"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source3/utils/net_ads.c" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

net_ads.c  (samba-4.12.3):net_ads.c  (samba-4.12.5)
skipping to change at line 1705 skipping to change at line 1705
} }
#endif #endif
/******************************************************************* /*******************************************************************
********************************************************************/ ********************************************************************/
static int net_ads_join_usage(struct net_context *c, int argc, const char **argv ) static int net_ads_join_usage(struct net_context *c, int argc, const char **argv )
{ {
d_printf(_("net ads join [--no-dns-updates] [options]\n" d_printf(_("net ads join [--no-dns-updates] [options]\n"
"Valid options:\n")); "Valid options:\n"));
d_printf(_(" dnshostname=FQDN Set the dnsHostName attribute during
the join.\n"
" The default is in the form netbiosna
me.dnsdomain\n"));
d_printf(_(" createupn[=UPN] Set the userPrincipalName attribute during the join.\n" d_printf(_(" createupn[=UPN] Set the userPrincipalName attribute during the join.\n"
" The default UPN is in the form host/ netbiosname@REALM.\n")); " The default UPN is in the form host/ netbiosname@REALM.\n"));
d_printf(_(" createcomputer=OU Precreate the computer account in a specific OU.\n" d_printf(_(" createcomputer=OU Precreate the computer account in a specific OU.\n"
" The OU string read from top to botto m without RDNs\n" " The OU string read from top to botto m without RDNs\n"
" and delimited by a '/'.\n" " and delimited by a '/'.\n"
" E.g. \"createcomputer=Computers/Serv ers/Unix\"\n" " E.g. \"createcomputer=Computers/Serv ers/Unix\"\n"
" NB: A backslash '\\' is used as esca pe at multiple\n" " NB: A backslash '\\' is used as esca pe at multiple\n"
" levels and may need to be double d or even\n" " levels and may need to be double d or even\n"
" quadrupled. It is not used as a separator.\n")); " quadrupled. It is not used as a separator.\n"));
d_printf(_(" machinepass=PASS Set the machine password to a specif ic value during\n" d_printf(_(" machinepass=PASS Set the machine password to a specif ic value during\n"
skipping to change at line 1823 skipping to change at line 1825
return; return;
} }
int net_ads_join(struct net_context *c, int argc, const char **argv) int net_ads_join(struct net_context *c, int argc, const char **argv)
{ {
TALLOC_CTX *ctx = NULL; TALLOC_CTX *ctx = NULL;
struct libnet_JoinCtx *r = NULL; struct libnet_JoinCtx *r = NULL;
const char *domain = lp_realm(); const char *domain = lp_realm();
WERROR werr = WERR_NERR_SETUPNOTJOINED; WERROR werr = WERR_NERR_SETUPNOTJOINED;
bool createupn = false; bool createupn = false;
const char *dnshostname = NULL;
const char *machineupn = NULL; const char *machineupn = NULL;
const char *machine_password = NULL; const char *machine_password = NULL;
const char *create_in_ou = NULL; const char *create_in_ou = NULL;
int i; int i;
const char *os_name = NULL; const char *os_name = NULL;
const char *os_version = NULL; const char *os_version = NULL;
const char *os_servicepack = NULL; const char *os_servicepack = NULL;
bool modify_config = lp_config_backend_is_registry(); bool modify_config = lp_config_backend_is_registry();
enum libnetjoin_JoinDomNameType domain_name_type = JoinDomNameTypeDNS; enum libnetjoin_JoinDomNameType domain_name_type = JoinDomNameTypeDNS;
skipping to change at line 1863 skipping to change at line 1866
} }
werr = libnet_init_JoinCtx(ctx, &r); werr = libnet_init_JoinCtx(ctx, &r);
if (!W_ERROR_IS_OK(werr)) { if (!W_ERROR_IS_OK(werr)) {
goto fail; goto fail;
} }
/* process additional command line args */ /* process additional command line args */
for ( i=0; i<argc; i++ ) { for ( i=0; i<argc; i++ ) {
if ( !strncasecmp_m(argv[i], "createupn", strlen("createupn")) ) if ( !strncasecmp_m(argv[i], "dnshostname", strlen("dnshostname")
{ ) ) {
dnshostname = get_string_param(argv[i]);
}
else if ( !strncasecmp_m(argv[i], "createupn", strlen("createupn"
)) ) {
createupn = true; createupn = true;
machineupn = get_string_param(argv[i]); machineupn = get_string_param(argv[i]);
} }
else if ( !strncasecmp_m(argv[i], "createcomputer", strlen("creat ecomputer")) ) { else if ( !strncasecmp_m(argv[i], "createcomputer", strlen("creat ecomputer")) ) {
if ( (create_in_ou = get_string_param(argv[i])) == NULL ) { if ( (create_in_ou = get_string_param(argv[i])) == NULL ) {
d_fprintf(stderr, _("Please supply a valid OU pat h.\n")); d_fprintf(stderr, _("Please supply a valid OU pat h.\n"));
werr = WERR_INVALID_PARAMETER; werr = WERR_INVALID_PARAMETER;
goto fail; goto fail;
} }
} }
skipping to change at line 1931 skipping to change at line 1937
werr = WERR_ACCESS_DENIED; werr = WERR_ACCESS_DENIED;
goto fail; goto fail;
} }
/* Do the domain join here */ /* Do the domain join here */
r->in.domain_name = domain; r->in.domain_name = domain;
r->in.domain_name_type = domain_name_type; r->in.domain_name_type = domain_name_type;
r->in.create_upn = createupn; r->in.create_upn = createupn;
r->in.upn = machineupn; r->in.upn = machineupn;
r->in.dnshostname = dnshostname;
r->in.account_ou = create_in_ou; r->in.account_ou = create_in_ou;
r->in.os_name = os_name; r->in.os_name = os_name;
r->in.os_version = os_version; r->in.os_version = os_version;
r->in.os_servicepack = os_servicepack; r->in.os_servicepack = os_servicepack;
r->in.dc_name = c->opt_host; r->in.dc_name = c->opt_host;
r->in.admin_account = c->opt_user_name; r->in.admin_account = c->opt_user_name;
r->in.admin_password = net_prompt_pass(c, c->opt_user_name); r->in.admin_password = net_prompt_pass(c, c->opt_user_name);
r->in.machine_password = machine_password; r->in.machine_password = machine_password;
r->in.debug = true; r->in.debug = true;
r->in.use_kerberos = c->opt_kerberos; r->in.use_kerberos = c->opt_kerberos;
 End of changes. 4 change blocks. 
2 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)