summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/ipc.c14
-rw-r--r--source3/smbd/password.c27
-rw-r--r--source3/smbd/pipes.c1
-rw-r--r--source3/smbd/reply.c4
-rw-r--r--source3/smbd/server.c8
5 files changed, 26 insertions, 28 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 74ae115217..e3dcda9004 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -40,7 +40,7 @@ extern files_struct Files[];
extern connection_struct Connections[];
extern fstring local_machine;
-extern fstring myworkgroup;
+extern fstring global_myworkgroup;
#define NERR_Success 0
#define NERR_badpass 86
@@ -1035,7 +1035,7 @@ static int get_server_info(uint32 servertype,
if (!next_token(&ptr,s->comment, NULL)) continue;
if (!next_token(&ptr,s->domain , NULL)) {
/* this allows us to cope with an old nmbd */
- strcpy(s->domain,myworkgroup);
+ strcpy(s->domain,global_myworkgroup);
}
if (sscanf(stype,"%X",&s->type) != 1) {
@@ -1231,7 +1231,7 @@ static BOOL api_RNetServerEnum(int cnum, uint16 vuid, char *param, char *data,
if (strcmp(str1, "WrLehDz") == 0) {
StrnCpy(domain, p, sizeof(fstring)-1);
} else {
- StrnCpy(domain, myworkgroup, sizeof(fstring)-1);
+ StrnCpy(domain, global_myworkgroup, sizeof(fstring)-1);
}
if (lp_browse_list())
@@ -2039,7 +2039,7 @@ static BOOL api_RNetServerGetInfo(int cnum,uint16 vuid, char *param,char *data,
pstrcpy(comment,lp_serverstring());
- if ((count=get_server_info(SV_TYPE_ALL,&servers,myworkgroup))>0) {
+ if ((count=get_server_info(SV_TYPE_ALL,&servers,global_myworkgroup))>0) {
for (i=0;i<count;i++)
if (strequal(servers[i].name,local_machine))
{
@@ -2125,7 +2125,7 @@ static BOOL api_NetWkstaGetInfo(int cnum,uint16 vuid, char *param,char *data,
p += 4;
SIVAL(p,0,PTR_DIFF(p2,*rdata)); /* login domain */
- strcpy(p2,myworkgroup);
+ strcpy(p2,global_myworkgroup);
strupper(p2);
p2 = skip_string(p2,1);
p += 4;
@@ -2135,7 +2135,7 @@ static BOOL api_NetWkstaGetInfo(int cnum,uint16 vuid, char *param,char *data,
p += 2;
SIVAL(p,0,PTR_DIFF(p2,*rdata));
- strcpy(p2,myworkgroup); /* don't know. login domain?? */
+ strcpy(p2,global_myworkgroup); /* don't know. login domain?? */
p2 = skip_string(p2,1);
p += 4;
@@ -2578,7 +2578,7 @@ static BOOL api_WWkstaUserLogon(int cnum,uint16 vuid, char *param,char *data,
strupper(mypath);
PACKS(&desc,"z",mypath); /* computer */
}
- PACKS(&desc,"z",myworkgroup);/* domain */
+ PACKS(&desc,"z",global_myworkgroup);/* domain */
/* JHT - By calling lp_logon_script() and standard_sub() we have */
/* made sure all macros are fully substituted and available */
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 11ffe4afd1..0e9ec620b1 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -31,7 +31,7 @@ extern int Protocol;
/* users from session setup */
static pstring session_users="";
-extern pstring myname;
+extern pstring global_myname;
/* these are kept here to keep the string_combinations function simple */
static char this_user[100]="";
@@ -1783,8 +1783,8 @@ BOOL server_validate(char *user, char *domain,
* need to detect this as some versions of NT4.x are broken. JRA.
*/
- if (cli_session_setup(&pw_cli, user, badpass, sizeof(badpass), badpass, sizeof(badpass),
- domain)) {
+ if (cli_session_setup(&pw_cli, user, (char *)badpass, sizeof(badpass),
+ (char *)badpass, sizeof(badpass), domain)) {
if ((SVAL(pw_cli.inbuf,smb_vwv2) & 1) == 0) {
DEBUG(0,("server_validate: password server %s allows users as non-guest \
with a bad password.\n", pw_cli.desthost));
@@ -1886,7 +1886,6 @@ BOOL domain_client_validate( char *user, char *domain,
struct in_addr dest_ip;
struct cli_state cli;
BOOL connected_ok = False;
- int fnum;
/*
* Check that the requested domain is not our own machine name.
@@ -1894,7 +1893,7 @@ BOOL domain_client_validate( char *user, char *domain,
* password file.
*/
- if(strequal( domain, myname)) {
+ if(strequal( domain, global_myname)) {
DEBUG(3,("domain_client_validate: Requested domain was for this machine.\n"));
return False;
}
@@ -1972,7 +1971,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
continue;
}
- if (!cli_session_request(&cli, remote_machine, 0x20, myname)) {
+ if (!cli_session_request(&cli, remote_machine, 0x20, global_myname)) {
DEBUG(0,("domain_client_validate: machine %s rejected the session setup. \
Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
cli_shutdown(&cli);
@@ -2033,23 +2032,23 @@ Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
return False;
}
+#if 0 /* for now... JRA */
/*
* Ok - we have an anonymous connection to the IPC$ share.
* Now start the NT Domain stuff :-).
*/
- /*
- * First, open the pipe to \PIPE\NETLOGON.
- */
-
- if((fnum = cli_open(&cli, PIPE_NETLOGON, O_CREAT, DENY_NONE)) == -1) {
- DEBUG(0,("domain_client_validate: cli_open on %s on machine %s failed. Error was :%s.\n",
- PIPE_NETLOGON, remote_machine, cli_errstr(&cli)));
+ if(cli_nt_session_open(&cli, PIPE_NETLOGON, False) == False) {
+ DEBUG(0,("domain_client_validate: unable to open the domain client session to \
+machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli)));
+ cli_close(&cli, fnum);
cli_ulogoff(&cli);
cli_shutdown(&cli);
- return False;
+ return False;
}
+ if(cli_nt_setup_creds(&cli,) HERE
+#endif
return False;
}
#endif /* DOMAIN_CLIENT */
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 4d425cc2c0..fa11060ade 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -41,7 +41,6 @@ extern char magic_char;
extern BOOL case_sensitive;
extern pstring sesssetup_user;
extern int Client;
-extern fstring myworkgroup;
#define VALID_PNUM(pnum) (((pnum) >= 0) && ((pnum) < MAX_OPEN_PIPES))
#define OPEN_PNUM(pnum) (VALID_PNUM(pnum) && Pipes[pnum].open)
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 4472aa16e6..fe1de65be3 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -41,7 +41,7 @@ extern BOOL case_sensitive;
extern BOOL case_preserve;
extern BOOL short_case_preserve;
extern pstring sesssetup_user;
-extern fstring myworkgroup;
+extern fstring global_myworkgroup;
extern int Client;
extern int global_oplock_break;
@@ -671,7 +671,7 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
p = smb_buf(outbuf);
strcpy(p,"Unix"); p = skip_string(p,1);
strcpy(p,"Samba "); strcat(p,VERSION); p = skip_string(p,1);
- strcpy(p,myworkgroup); p = skip_string(p,1);
+ strcpy(p,global_myworkgroup); p = skip_string(p,1);
set_message(outbuf,3,PTR_DIFF(p,smb_buf(outbuf)),False);
/* perhaps grab OS version here?? */
}
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 81fe5c9306..167911e497 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -25,7 +25,7 @@
pstring servicesf = CONFIGFILE;
extern pstring debugf;
extern pstring sesssetup_user;
-extern fstring myworkgroup;
+extern fstring global_myworkgroup;
char *InBuffer = NULL;
char *OutBuffer = NULL;
@@ -3961,10 +3961,10 @@ int reply_nt1(char *outbuf)
/* decide where (if) to put the encryption challenge, and
follow it with the OEM'd domain name
*/
- data_len = crypt_len + strlen(myworkgroup) + 1;
+ data_len = crypt_len + strlen(global_myworkgroup) + 1;
set_message(outbuf,17,data_len,True);
- strcpy(smb_buf(outbuf)+crypt_len, myworkgroup);
+ strcpy(smb_buf(outbuf)+crypt_len, global_myworkgroup);
CVAL(outbuf,smb_vwv1) = secword;
SSVALS(outbuf,smb_vwv16+1,crypt_len);
@@ -5154,7 +5154,7 @@ static void usage(char *pname)
codepage_initialise(lp_client_code_page());
- strcpy(myworkgroup, lp_workgroup());
+ strcpy(global_myworkgroup, lp_workgroup());
#ifndef NO_SIGNAL_TEST
signal(SIGHUP,SIGNAL_CAST sig_hup);