summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-24 09:05:37 +0200
committerGünther Deschner <gd@samba.org>2008-09-25 20:11:55 +0200
commit81fde585516957b6a7742e0168c68df33572ed74 (patch)
tree23af0592c243f526000eec737111e9fe96021848 /source3
parent6f46002ff6b153730635bfd4a8380792a815ce6b (diff)
downloadsamba-81fde585516957b6a7742e0168c68df33572ed74.tar.gz
samba-81fde585516957b6a7742e0168c68df33572ed74.tar.bz2
samba-81fde585516957b6a7742e0168c68df33572ed74.zip
s3-nbt: remove double nbt netlogon opcodes.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/nameserv.h11
-rw-r--r--source3/nmbd/nmbd_processlogon.c30
-rw-r--r--source3/utils/net_ads.c8
3 files changed, 19 insertions, 30 deletions
diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h
index 4377e3330a..a7d46e72d8 100644
--- a/source3/include/nameserv.h
+++ b/source3/include/nameserv.h
@@ -539,17 +539,6 @@ struct packet_struct
} packet;
};
-/* NETLOGON opcodes */
-
-#define QUERYFORPDC 7 /* Query for PDC. */
-#define SAM_UAS_CHANGE 10 /* Announce change to UAS or SAM. */
-#define QUERYFORPDC_R 12 /* Response to Query for PDC. */
-#define SAMLOGON 18
-#define SAMLOGON_R 19
-#define SAMLOGON_UNK_R 21
-#define SAMLOGON_AD_UNK_R 23
-#define SAMLOGON_AD_R 25
-
/* Ids for netbios packet types. */
#define ANN_HostAnnouncement 1
diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c
index 474ae1ca18..814eaf7ca8 100644
--- a/source3/nmbd/nmbd_processlogon.c
+++ b/source3/nmbd/nmbd_processlogon.c
@@ -178,7 +178,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
break;
}
- case QUERYFORPDC:
+ case LOGON_PRIMARY_QUERY:
{
fstring mach_str, getdc_str;
fstring source_name;
@@ -253,7 +253,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
/* Construct reply. */
q = outbuf;
- SSVAL(q, 0, QUERYFORPDC_R);
+ SSVAL(q, 0, NETLOGON_RESPONSE_FROM_PDC);
q += 2;
fstrcpy(reply_name,my_name);
@@ -292,7 +292,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
DEBUG(5,("process_logon_packet: GETDC request from %s at IP %s, \
reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
mach_str,inet_ntoa(p->ip), reply_name, lp_workgroup(),
- QUERYFORPDC_R, (uint32)ntversion, (uint32)lmnttoken,
+ NETLOGON_RESPONSE_FROM_PDC, (uint32)ntversion, (uint32)lmnttoken,
(uint32)lm20token ));
dump_data(4, (uint8 *)outbuf, PTR_DIFF(q, outbuf));
@@ -309,7 +309,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
return;
}
- case SAMLOGON:
+ case LOGON_SAM_LOGON_REQUEST:
{
fstring getdc_str;
@@ -351,7 +351,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
domainsidsize = IVAL(q, 0);
q += 4;
- DEBUG(5,("process_logon_packet: SAMLOGON sidsize %d, len = %d\n", domainsidsize, len));
+ DEBUG(5,("process_logon_packet: LOGON_SAM_LOGON_REQUEST sidsize %d, len = %d\n", domainsidsize, len));
if (domainsidsize < (len - PTR_DIFF(q, buf)) && (domainsidsize != 0)) {
q += domainsidsize;
@@ -383,7 +383,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
lm20token = SVAL(q, 6);
q += 8;
- DEBUG(3,("process_logon_packet: SAMLOGON sidsize %d ntv %d\n", domainsidsize, ntversion));
+ DEBUG(3,("process_logon_packet: LOGON_SAM_LOGON_REQUEST sidsize %d ntv %d\n", domainsidsize, ntversion));
/*
* we respond regadless of whether the machine is in our password
@@ -392,14 +392,14 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
*/
pull_ucs2_fstring(ascuser, uniuser);
pull_ucs2_fstring(asccomp, unicomp);
- DEBUG(5,("process_logon_packet: SAMLOGON user %s\n", ascuser));
+ DEBUG(5,("process_logon_packet: LOGON_SAM_LOGON_REQUEST user %s\n", ascuser));
fstrcpy(reply_name, "\\\\"); /* Here it wants \\LOGONSERVER. */
fstrcat(reply_name, my_name);
- DEBUG(5,("process_logon_packet: SAMLOGON request from %s(%s) for %s, returning logon svr %s domain %s code %x token=%x\n",
+ DEBUG(5,("process_logon_packet: LOGON_SAM_LOGON_REQUEST request from %s(%s) for %s, returning logon svr %s domain %s code %x token=%x\n",
asccomp,inet_ntoa(p->ip), ascuser, reply_name, lp_workgroup(),
- SAMLOGON_R ,lmnttoken));
+ LOGON_SAM_LOGON_RESPONSE ,lmnttoken));
/* Construct reply. */
@@ -408,9 +408,9 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
/* never, at least for now */
if ((ntversion < 11) || (SEC_ADS != lp_security()) || (ROLE_DOMAIN_PDC != lp_server_role())) {
if (SVAL(uniuser, 0) == 0) {
- SSVAL(q, 0, SAMLOGON_UNK_R); /* user unknown */
+ SSVAL(q, 0, LOGON_SAM_LOGON_USER_UNKNOWN); /* user unknown */
} else {
- SSVAL(q, 0, SAMLOGON_R);
+ SSVAL(q, 0, LOGON_SAM_LOGON_RESPONSE);
}
q += 2;
@@ -453,9 +453,9 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
return;
}
if (SVAL(uniuser, 0) == 0) {
- SIVAL(q, 0, SAMLOGON_AD_UNK_R); /* user unknown */
+ SIVAL(q, 0, LOGON_SAM_LOGON_USER_UNKNOWN_EX); /* user unknown */
} else {
- SIVAL(q, 0, SAMLOGON_AD_R);
+ SIVAL(q, 0, LOGON_SAM_LOGON_RESPONSE_EX);
}
q += 4;
@@ -684,8 +684,8 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
/* Announce change to UAS or SAM. Send by the domain controller when a
replication event is required. */
- case SAM_UAS_CHANGE:
- DEBUG(5, ("Got SAM_UAS_CHANGE\n"));
+ case NETLOGON_ANNOUNCE_UAS:
+ DEBUG(5, ("Got NETLOGON_ANNOUNCE_UAS\n"));
break;
default:
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 1ef4c152a3..627374cb96 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -56,11 +56,11 @@ static int net_ads_cldap_netlogon(struct net_context *c, ADS_STRUCT *ads)
d_printf("Response Type: ");
switch (reply.command) {
- case SAMLOGON_AD_UNK_R:
- d_printf("SAMLOGON\n");
+ case LOGON_SAM_LOGON_USER_UNKNOWN_EX:
+ d_printf("LOGON_SAM_LOGON_USER_UNKNOWN_EX\n");
break;
- case SAMLOGON_AD_R:
- d_printf("SAMLOGON_USER\n");
+ case LOGON_SAM_LOGON_RESPONSE_EX:
+ d_printf("LOGON_SAM_LOGON_RESPONSE_EX\n");
break;
default:
d_printf("0x%x\n", reply.command);