samba.git
25 years agoFixed a typo where the RPC header mem_buffer was initialised as 0x8 bytes long
Matthew Chapman [Tue, 23 Mar 1999 15:01:37 +0000 (15:01 +0000)]
Fixed a typo where the RPC header mem_buffer was initialised as 0x8 bytes long
rather than 0x18. Rather nasty, I doubt the client ever worked for multiple
PDU's.

25 years agoERRmoredata is informational and should not be treated as a hard error
Matthew Chapman [Tue, 23 Mar 1999 14:58:26 +0000 (14:58 +0000)]
ERRmoredata is informational and should not be treated as a hard error
anywhere.

25 years agoSame infinite loop bug as I fixed in SAMBA_2_0, but I just spent half
Matthew Chapman [Tue, 23 Mar 1999 14:56:25 +0000 (14:56 +0000)]
Same infinite loop bug as I fixed in SAMBA_2_0, but I just spent half
an hour tracking it down in HEAD so I'm going to commit it here as well.

25 years ago#if defined(HAVE_MYSQL_H) || defined(WITH_MYSQLSAM)
Matthew Chapman [Tue, 23 Mar 1999 14:14:12 +0000 (14:14 +0000)]
#if defined(HAVE_MYSQL_H) || defined(WITH_MYSQLSAM)
should instead have &&.

25 years agoAnother UNICODE issue - this time BUFFER2 was being transmitted incorrectly.
Matthew Chapman [Tue, 23 Mar 1999 13:45:42 +0000 (13:45 +0000)]
Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.

25 years agoIf a buffer pointer is NULL then its length_is() attribute should not be
Matthew Chapman [Tue, 23 Mar 1999 02:31:34 +0000 (02:31 +0000)]
If a buffer pointer is NULL then its length_is() attribute should not be
transmitted.

Such a problem was crashing Server Manager.

25 years agoThe line:
Matthew Chapman [Sun, 21 Mar 1999 13:01:31 +0000 (13:01 +0000)]
The line:

    this_pdu_data_pos = data_pos - p->prev_pdu_file_offset;

is correct for first two PDU's only, after that it results in extra
garbage after each fragment and hence "Protocol Error" messages from
NT4 SP4. Changed to:

    this_pdu_data_pos = (pdu_data_sent == 0) ? 0 : (pdu_data_sent - 0x18);

25 years agoEnsuring return status is aligned in SAMR_QUERY_DISPINFO response.
Matthew Chapman [Sun, 21 Mar 1999 12:55:18 +0000 (12:55 +0000)]
Ensuring return status is aligned in SAMR_QUERY_DISPINFO response.

25 years agoadded a "createuser" command.
Luke Leighton [Fri, 19 Mar 1999 21:20:19 +0000 (21:20 +0000)]
added a "createuser" command.

25 years agovalue->enc_secret not value->secret
Luke Leighton [Fri, 19 Mar 1999 21:15:03 +0000 (21:15 +0000)]
value->enc_secret not value->secret

25 years agoconst char* instead of char* for input
Luke Leighton [Fri, 19 Mar 1999 20:58:24 +0000 (20:58 +0000)]
const char* instead of char* for input

25 years agoreturn type of nt_decrypt_string2 set to BOOL.
Luke Leighton [Fri, 19 Mar 1999 20:26:25 +0000 (20:26 +0000)]
return type of nt_decrypt_string2 set to BOOL.

25 years agogoing to start adding inter-domain trust logons soon.
Luke Leighton [Fri, 19 Mar 1999 15:49:22 +0000 (15:49 +0000)]
going to start adding inter-domain trust logons soon.

25 years agovalid_pol in lsa_query_secret() needed to be initialised to False.
Luke Leighton [Fri, 19 Mar 1999 15:39:43 +0000 (15:39 +0000)]
valid_pol in lsa_query_secret() needed to be initialised to False.

25 years agoquerysecret now shows the real, fairdinkum, decrypted secret :-)
Matthew Chapman [Fri, 19 Mar 1999 15:11:07 +0000 (15:11 +0000)]
querysecret now shows the real, fairdinkum, decrypted secret :-)

25 years agoImplemented encryption algorithm used for a number of RPC buffers.
Matthew Chapman [Fri, 19 Mar 1999 15:09:25 +0000 (15:09 +0000)]
Implemented encryption algorithm used for a number of RPC buffers.
(actually, decryption only currently because I need to get some sleep).

Basically another Microsoft twist on DES; the "master key" is the user's
NT hash MD4'd and subsets of this are chosen as the 56-bit DES keys.

25 years agoBeau Kuiper: provided patch so that passwords could only be changed by
Luke Leighton [Fri, 19 Mar 1999 05:00:39 +0000 (05:00 +0000)]
Beau Kuiper: provided patch so that passwords could only be changed by
root if the ACB_PWLOCK bit is set (on a per-user basis).  he also added
an extra smbpasswd option so that this bit can be modified from
command-line.

25 years agodouble-checked the return results from new querysecret command, corrected
Luke Leighton [Thu, 18 Mar 1999 22:13:15 +0000 (22:13 +0000)]
double-checked the return results from new querysecret command, corrected
my corrections :)

25 years agomatt,
Luke Leighton [Thu, 18 Mar 1999 22:12:05 +0000 (22:12 +0000)]
matt,

remember: only close handles that you've previously opened.  if the
lsa_open_secret() succeeds then and only then can you close it.
if the lsa_open_policy2() succeeds then and only then can you close it.

25 years agoAdded SVC_START_SERVICE rpc. An NT PDC will attempt to start the NETLOGON
Matthew Chapman [Thu, 18 Mar 1999 09:36:43 +0000 (09:36 +0000)]
Added SVC_START_SERVICE rpc. An NT PDC will attempt to start the NETLOGON
service on its BDC's prior to initiating SAM replication. For now just
return success.

25 years agoChanged hard-coded number of users/groups in SAMR_QUERY_DOMAIN_INFO
Matthew Chapman [Thu, 18 Mar 1999 06:30:27 +0000 (06:30 +0000)]
Changed hard-coded number of users/groups in SAMR_QUERY_DOMAIN_INFO
to MAX_SAM_ENTRIES to prevent truncation of user lists.
A proper implementation is not important right now.

25 years agoAdding LSA_OPENSECRET (-> LsarOpenSecret) and LSA_QUERYSECRET
Matthew Chapman [Thu, 18 Mar 1999 05:16:59 +0000 (05:16 +0000)]
Adding LSA_OPENSECRET (-> LsarOpenSecret) and LSA_QUERYSECRET
(-> LsarQuerySecret) on client side, including rpcclient command
"querysecret" for others to play with.

The major obstacle is working out the encryption algorithm used
for the secret value. It definitely uses the NT hash as part of the
key, and it seems the block size is 64 bits - probably DES based -
but I can't work out what's done in between. Help required.

25 years agoSAMLOGON query - alignment issue is beginning to get to me.
Luke Leighton [Wed, 17 Mar 1999 21:35:10 +0000 (21:35 +0000)]
SAMLOGON query - alignment issue is beginning to get to me.

25 years agoStefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8.
Luke Leighton [Wed, 17 Mar 1999 19:49:14 +0000 (19:49 +0000)]
Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8.

25 years agoalignment issue for UDP SAMLOGON response.
Luke Leighton [Wed, 17 Mar 1999 19:48:29 +0000 (19:48 +0000)]
alignment issue for UDP SAMLOGON response.

25 years agoAdded SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Matthew Chapman [Tue, 16 Mar 1999 06:24:24 +0000 (06:24 +0000)]
Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Needed during preliminary part of SAM replication.

25 years agoDon't forget to make proto.
Matthew Chapman [Sun, 14 Mar 1999 01:25:11 +0000 (01:25 +0000)]
Don't forget to make proto.

25 years agoStefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter...
Luke Leighton [Fri, 12 Mar 1999 19:53:28 +0000 (19:53 +0000)]
Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.

25 years agocli_setup_creds new arguments added.
Luke Leighton [Fri, 12 Mar 1999 19:37:40 +0000 (19:37 +0000)]
cli_setup_creds new arguments added.

25 years agonew "domtrust" test command. r&d into inter-domain trust accounts.
Luke Leighton [Fri, 12 Mar 1999 05:47:06 +0000 (05:47 +0000)]
new "domtrust" test command.  r&d into inter-domain trust accounts.

25 years agocheck for exactly _one_ key: for USRMGR.EXE.
Luke Leighton [Fri, 12 Mar 1999 05:46:10 +0000 (05:46 +0000)]
check for exactly _one_ key: for USRMGR.EXE.

25 years agostatic password space needed.
Luke Leighton [Wed, 10 Mar 1999 17:32:41 +0000 (17:32 +0000)]
static password space needed.

25 years agoGreg Dickie: spotted bug where smb_nt_passwd could be NULL.
Luke Leighton [Wed, 10 Mar 1999 17:06:07 +0000 (17:06 +0000)]
Greg Dickie: spotted bug where smb_nt_passwd could be NULL.

25 years agoGreg Dickie spotted some wierd memory corruption problem with group
Luke Leighton [Tue, 9 Mar 1999 23:22:36 +0000 (23:22 +0000)]
Greg Dickie spotted some wierd memory corruption problem with group
database enumeration.

25 years agoalignment issue in UDP SAMLOGON response.
Luke Leighton [Tue, 9 Mar 1999 02:03:39 +0000 (02:03 +0000)]
alignment issue in UDP SAMLOGON response.

25 years agomods to allow inter-domain trust accounts to be added to SAM database
Luke Leighton [Tue, 9 Mar 1999 01:21:57 +0000 (01:21 +0000)]
mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.

25 years agooh dear, it's this one again. removed check for MAILSLOT\NTLOGON because
Luke Leighton [Tue, 9 Mar 1999 01:20:08 +0000 (01:20 +0000)]
oh dear, it's this one again.  removed check for MAILSLOT\NTLOGON because
it's wrong.  i've seen a packet from nt client on MAILSLOT\NETLOGON
with appended undocumented unicode tacked on the end and the response
contained undocumented unicode tacked on the end.

25 years agooops, IS_BITS_CLR_ALL() macro was wrong!
Luke Leighton [Tue, 9 Mar 1999 01:17:42 +0000 (01:17 +0000)]
oops, IS_BITS_CLR_ALL() macro was wrong!

25 years agoreverted access control flags in enum commands.
Luke Leighton [Tue, 9 Mar 1999 01:17:16 +0000 (01:17 +0000)]
reverted access control flags in enum commands.

25 years ago- todd sabin spotted bugs in samr enum dom users / groups / aliases code:
Luke Leighton [Mon, 8 Mar 1999 19:19:01 +0000 (19:19 +0000)]
- todd sabin spotted bugs in samr enum dom users / groups / aliases code:
  last count (probably an ENUM / resume handle) should always be returned
  even if there are no items being returned.

- got fed up of seven intendation levels in cmd_samr.c, maximum recommended
  in *any* code is three!  made some sub-fns instead.

25 years agopass_check.c could receive encrypted password: printing it out as a %s
Luke Leighton [Mon, 8 Mar 1999 18:43:50 +0000 (18:43 +0000)]
pass_check.c could receive encrypted password: printing it out as a %s
results in garbage.  with no password length argument doing dump_data(
100, password, strlen(password)) is the next best alternative.

25 years agooops, accidentally committed clear-text password reading last week.
Luke Leighton [Mon, 8 Mar 1999 18:42:43 +0000 (18:42 +0000)]
oops, accidentally committed clear-text password reading last week.

25 years agoBejamin Kuit. #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found.
Luke Leighton [Mon, 8 Mar 1999 18:41:58 +0000 (18:41 +0000)]
Bejamin Kuit.  #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found.

25 years agospelling mistake, #ifdef'd out for non-developers (oops!)
Luke Leighton [Fri, 5 Mar 1999 22:37:02 +0000 (22:37 +0000)]
spelling mistake, #ifdef'd out for non-developers (oops!)

25 years agooops, put -DDEBUG_PASSWORD in wrong place.
Luke Leighton [Fri, 5 Mar 1999 22:33:32 +0000 (22:33 +0000)]
oops, put -DDEBUG_PASSWORD in wrong place.

25 years agoBenjamin Kuit's mods.
Luke Leighton [Fri, 5 Mar 1999 22:03:04 +0000 (22:03 +0000)]
Benjamin Kuit's mods.

25 years agoBenjamin Kuit's latest mysql mods. issue with "make proto" needs to be
Luke Leighton [Wed, 3 Mar 1999 20:48:48 +0000 (20:48 +0000)]
Benjamin Kuit's latest mysql mods.  issue with "make proto" needs to be
resolved.

25 years agoadded <mysql.h> autoconf test.
Luke Leighton [Tue, 2 Mar 1999 16:43:27 +0000 (16:43 +0000)]
added <mysql.h> autoconf test.

25 years agoBenjamin Kuit's MYSQL SAM Database implementation.
Luke Leighton [Mon, 1 Mar 1999 16:31:14 +0000 (16:31 +0000)]
Benjamin Kuit's MYSQL SAM Database implementation.
Copyright (C) Benjamin Kuit <bj@mcs.uts.edu.au> 1999.

25 years agoimproving syntax / useability of rpcclient "shutdown" command:
Luke Leighton [Mon, 1 Mar 1999 16:01:45 +0000 (16:01 +0000)]
improving syntax / useability of rpcclient "shutdown" command:
rpcclient [-m messsage] [-t timeout] [-r or --reboot].

25 years agoreferred reader to NT Domain FAQ for more info (copy of update to 2.0)
Gerald Carter [Thu, 25 Feb 1999 15:00:24 +0000 (15:00 +0000)]
referred reader to NT Domain FAQ for more info (copy of update to 2.0)

25 years agoReturn either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending on
Matthew Chapman [Wed, 24 Feb 1999 19:08:43 +0000 (19:08 +0000)]
Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending on
whether the client supports 32-bit error codes.

25 years agoAdded "lookupdomain" rpcclient command. Not particularly useful currently
Matthew Chapman [Wed, 24 Feb 1999 01:58:08 +0000 (01:58 +0000)]
Added "lookupdomain" rpcclient command. Not particularly useful currently
(you can do "lookupdomain MYDOMAIN" and "lookupdomain BUILTIN" and the
results won't be too surprising), but it will come in useful testing the
new password database code I'm working on.

25 years agoWin9x user level security.
Matthew Chapman [Wed, 24 Feb 1999 01:52:30 +0000 (01:52 +0000)]
Win9x user level security.

* Added SAMR_LOOKUP_DOMAIN (-> SamrLookupDomainInSamServer)

* Added real SAMR_ENUM_DOM_GROUPS (corresponding to
SamrEnumerateGroupsInDomain). The existing one is just an alias for
SamrQueryDisplayInformation (see below).

* Added three extra info levels to SAMR_QUERY_DISPINFO. Info level 3 is
what was previously SAMR_ENUM_DOM_GROUPS; info levels 4 and 5 are
simple user/group list requests used by Win9x and I suspect (haven't
checked) the "low speed connection" User Manager.

* Added another two aliases for SAMR_QUERY_DISPINFO, opcodes 0x30 and
0x33. Usually the first is with info level 3 and the second 4 but there is
some overlap so indeed these should be implemented as just aliases.

* Return ERRDOS/ERRmoredata on extra data instead of
STATUS_BUFFER_OVERFLOW for Win95's benefit. On a named pipe this results
in an SMBreadX as usual.

Still need to fix SAMR_QUERY_DOMAIN_INFO which has a hard-coded number of
users and groups - which Win95 proceeds to truncate at.

25 years agoadded jeremy's new c++-like code for parsing of security descriptors.
Luke Leighton [Tue, 23 Feb 1999 22:39:54 +0000 (22:39 +0000)]
added jeremy's new c++-like code for parsing of security descriptors.

25 years agosamr_lookup_names "none found" error needed corrections with empty lists.
Luke Leighton [Fri, 19 Feb 1999 17:41:05 +0000 (17:41 +0000)]
samr_lookup_names "none found" error needed corrections with empty lists.

25 years agolast unix group not being listed. spotted by jacques sansdrap.
Luke Leighton [Fri, 19 Feb 1999 15:46:38 +0000 (15:46 +0000)]
last unix group not being listed.  spotted by jacques sansdrap.

25 years agoproblem been there for months: reg_r_info not aligning after string buffer.
Luke Leighton [Thu, 18 Feb 1999 18:50:44 +0000 (18:50 +0000)]
problem been there for months: reg_r_info not aligning after string buffer.

25 years agoGot to the bottom of another weird one...
Michael Warfield [Thu, 18 Feb 1999 04:33:06 +0000 (04:33 +0000)]
Got to the bottom of another weird one...

Piping the output of smbmount back to autofs/automount was causing the
automount process to hang.  Reason was that automount was depending
on the pipe to close to continue on, rather than detecting the child
signal.  This occured with debug enabled and the daemon process was not
closing the stdout process.  Disabling debuging avoids the problem.
Debugging is turned off in the cvs repository and a warning placed over
the debugging option.

25 years agorpcclient shutdown command
Luke Leighton [Tue, 16 Feb 1999 18:04:21 +0000 (18:04 +0000)]
rpcclient shutdown command

25 years agobitmap to strings
Luke Leighton [Tue, 16 Feb 1999 18:02:50 +0000 (18:02 +0000)]
bitmap to strings

25 years agoAlways null-terminate strings.
Matthew Chapman [Mon, 15 Feb 1999 05:33:30 +0000 (05:33 +0000)]
Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.

25 years agoAlways null-terminate strings.
Matthew Chapman [Mon, 15 Feb 1999 05:31:52 +0000 (05:31 +0000)]
Always null-terminate strings.

25 years agoAdded caching of user password if it was entered via getpass. We were already
Michael Warfield [Sun, 14 Feb 1999 23:15:54 +0000 (23:15 +0000)]
Added caching of user password if it was entered via getpass.  We were already
caching the password if it came from the command line or from the environment.
This completes the set and deals with the bloody nusance when reconnecting
a connection after we have gone daemon...  Grrr...

Added code to clean up the mount point following a catastrophic failure
during reconnect.  The smbmount daemon was exiting but leaving the mount
point in an unusable state.  If smbmount must exit following a reconnect
failure, we "unmount" the mount point and clean up mnttab.  Currently,
the unmount works, fixing some really ugly I/O errors and failure when
trying to remount.  The cleanup on mnttab still has problems.  This
is better than what it was and doesn't break anything that wasn't broken
before, so I'm committing this in even with the mnttab problem.  Will
commit the fix to that when I figure out what is busted there...

-mhw-

25 years agoFolding into Samba-2.1.X tree documents added to 2.0.3.
John Terpstra [Sun, 14 Feb 1999 04:40:05 +0000 (04:40 +0000)]
Folding into Samba-2.1.X tree documents added to 2.0.3.

25 years ago Fixed a glibc glitch in smbumount.c and reenabled some debugging
Michael Warfield [Sat, 13 Feb 1999 18:36:49 +0000 (18:36 +0000)]
Fixed a glibc glitch in smbumount.c and reenabled some debugging
in smbmount.c

25 years agoconst cast issues. [p.s - tidy work, matt!]
Luke Leighton [Fri, 12 Feb 1999 15:35:27 +0000 (15:35 +0000)]
const cast issues.  [p.s - tidy work, matt!]

25 years agoconst issues with byte mod / byte read macros.
Luke Leighton [Fri, 12 Feb 1999 15:34:57 +0000 (15:34 +0000)]
const issues with byte mod / byte read macros.

25 years agoCut and paste error.
Matthew Chapman [Fri, 12 Feb 1999 03:09:24 +0000 (03:09 +0000)]
Cut and paste error.

25 years agoUNICODE cleanup (see lib/util_unistr.c).
Matthew Chapman [Fri, 12 Feb 1999 00:16:09 +0000 (00:16 +0000)]
UNICODE cleanup (see lib/util_unistr.c).

No more ugly static library buffers and all functions take a destination
string length (especially unistrcpy was rather dangerous; we were only
saved by the fact that datagrams are limited in size).

25 years agoUNICODE issues.
Luke Leighton [Thu, 11 Feb 1999 22:12:49 +0000 (22:12 +0000)]
UNICODE issues.

25 years agothe UNICODE issue...
Luke Leighton [Thu, 11 Feb 1999 18:50:13 +0000 (18:50 +0000)]
the UNICODE issue...

25 years agoenum dom users buffer was 0x80 not 0x8000. must fix "enumeration" code
Luke Leighton [Thu, 11 Feb 1999 18:48:18 +0000 (18:48 +0000)]
enum dom users buffer was 0x80 not 0x8000.  must fix "enumeration" code
as you need to make multiple enum dom users calls.

25 years agorefinement of random ipc$ SMBtrans torture test. send requests, and
Luke Leighton [Thu, 11 Feb 1999 18:35:26 +0000 (18:35 +0000)]
refinement of random ipc$ SMBtrans torture test.  send requests, and
don't wait for responses :-)

25 years agouninitialised pointer being freed if lookupnames failed. oops.
Luke Leighton [Thu, 11 Feb 1999 17:25:26 +0000 (17:25 +0000)]
uninitialised pointer being freed if lookupnames failed.  oops.

25 years agouse jeremy's versions of the UNICODE routines.
Luke Leighton [Wed, 10 Feb 1999 22:30:47 +0000 (22:30 +0000)]
use jeremy's versions of the UNICODE routines.

25 years agoHaving Well-known Domain Groups ("Domain Admins/Guests/Users") returned
Luke Leighton [Tue, 9 Feb 1999 22:13:20 +0000 (22:13 +0000)]
Having Well-known Domain Groups ("Domain Admins/Guests/Users") returned
under SID_NAME_ENUM 0x5 instead of 0x2 (Well-known group instead of
Domain Group) was making it impossible to view these groups from USRMGR.EXE.

25 years agogroups and aliases being "manually" added which do not necessarily have
Luke Leighton [Tue, 9 Feb 1999 21:56:06 +0000 (21:56 +0000)]
groups and aliases being "manually" added which do not necessarily have
representation in the underlying database: removed this code.

for example, with the nt->unix mapping system (don't know about the ldap
one) if you want "Domain Admins" to appear you _must_ put it in the
domaingroup.map file.

the previous code was adding builtin aliases and well-known groups even
if they weren't in the domain maps.  bad idea.

25 years agowhen multiple independent large rpc calls come in on the same pipe,
Luke Leighton [Tue, 9 Feb 1999 21:42:39 +0000 (21:42 +0000)]
when multiple independent large rpc calls come in on the same pipe,
prev_pdu_file_offset was not being re-initialised to zero.

25 years agoremoval of the use of unistrn2 function: replace it with unistr2_to_str
Luke Leighton [Tue, 9 Feb 1999 19:51:44 +0000 (19:51 +0000)]
removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate.

25 years agopwdb_smb_to_sam was not returning NULL for nt name so that
Luke Leighton [Tue, 9 Feb 1999 16:01:28 +0000 (16:01 +0000)]
pwdb_smb_to_sam was not returning NULL for nt name so that
pwdb_sam_map_names() was using a "blank" static string instead of
a NULL pointer for nt names.  NULL means over-ride, so the nt name
got left as "blank".

this causes nt clients to terminate with extreme prejudice.

25 years agoFix for NT BSOD problem. There's no reason to have two "NT usernames" running
Matthew Chapman [Tue, 9 Feb 1999 03:57:10 +0000 (03:57 +0000)]
Fix for NT BSOD problem. There's no reason to have two "NT usernames" running
around anyway.

The real problem is, once again, the brokenness of pwdb_sam_map_names et al.
This time it is deciding to return blank NT usernames, which NT's redirector
objects to.

I'm currently working on improving the pwdb/mapping code, should be ready in a
couple of weeks.

25 years agoUNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()
Luke Leighton [Mon, 8 Feb 1999 23:40:49 +0000 (23:40 +0000)]
UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()

25 years agoreload_services needs to be called prior to init_files but after
Luke Leighton [Mon, 8 Feb 1999 01:46:46 +0000 (01:46 +0000)]
reload_services needs to be called prior to init_files but after
get_myname.

25 years agoiteration of sam passwd entries was an order n-cubed algorithm due
Luke Leighton [Mon, 8 Feb 1999 00:24:57 +0000 (00:24 +0000)]
iteration of sam passwd entries was an order n-cubed algorithm due
to resolution of unix name to nt name being unnecessarily _inside_
another loop.

25 years agoinitialise my name (used in %h) prior to loading smb.conf files.
Luke Leighton [Wed, 3 Feb 1999 17:10:44 +0000 (17:10 +0000)]
initialise my name (used in %h) prior to loading smb.conf files.

25 years ago%s not $s
Luke Leighton [Wed, 3 Feb 1999 16:30:54 +0000 (16:30 +0000)]
%s not $s

25 years agocorrections to get data stream for 2nd and subsequent pdus copied from
Luke Leighton [Wed, 3 Feb 1999 01:58:52 +0000 (01:58 +0000)]
corrections to get data stream for 2nd and subsequent pdus copied from
right place (forgot to subtract 0x18 header bytes)

25 years agocache unix groups so that two-level getgrent calls don't occur.
Luke Leighton [Wed, 3 Feb 1999 00:49:24 +0000 (00:49 +0000)]
cache unix groups so that two-level getgrent calls don't occur.

25 years agomultiple dce/rpc PDUs failed to work after ntlmssp update was added.
Luke Leighton [Wed, 3 Feb 1999 00:48:27 +0000 (00:48 +0000)]
multiple dce/rpc PDUs failed to work after ntlmssp update was added.

25 years agoserver type announcements modified to include the "role" of the server:
Luke Leighton [Tue, 2 Feb 1999 19:53:10 +0000 (19:53 +0000)]
server type announcements modified to include the "role" of the server:
domain member, pdc, bdc.

25 years agoMinor change to bring smbmount in the main branch in line with some bzero
Michael Warfield [Mon, 1 Feb 1999 22:01:29 +0000 (22:01 +0000)]
Minor change to bring smbmount in the main branch in line with some bzero
to memset changes...

25 years agocomma after DOM_MAP_USER removed
Luke Leighton [Mon, 1 Feb 1999 16:32:01 +0000 (16:32 +0000)]
comma after DOM_MAP_USER removed

25 years agoMust set password length to 24 after we encrypt a password.
Matthew Chapman [Mon, 1 Feb 1999 05:25:54 +0000 (05:25 +0000)]
Must set password length to 24 after we encrypt a password.

25 years agoInitialise NTTIME properly in make_reg_q_enum_key instead of using
Matthew Chapman [Mon, 1 Feb 1999 02:39:37 +0000 (02:39 +0000)]
Initialise NTTIME properly in make_reg_q_enum_key instead of using
unix_to_nt_time hack. Seems to me it's ignored anyway (dummy return
buffer?).

25 years agoFixed a domain functionality problem where NT clients would start
Matthew Chapman [Mon, 1 Feb 1999 02:37:45 +0000 (02:37 +0000)]
Fixed a domain functionality problem where NT clients would start
endlessly repeating a network SAMLOGON (hoping it to change, hmmm...).

( Guess what I found in pwdb_init_sam...

  unix_to_nt_time(&user->logon_time, (time_t)-1);
  unix_to_nt_time(&user->logoff_time, (time_t)-1);
  unix_to_nt_time(&user->kickoff_time, (time_t)-1);
  ... )

25 years agoAdded init_nt_time function which initialises an NTTIME to -1.
Matthew Chapman [Mon, 1 Feb 1999 02:36:24 +0000 (02:36 +0000)]
Added init_nt_time function which initialises an NTTIME to -1.

25 years agoOk... Yet another round of fixes for smbmount and autofs.
Michael Warfield [Sun, 31 Jan 1999 21:28:55 +0000 (21:28 +0000)]
Ok...  Yet another round of fixes for smbmount and autofs.

1)  The earlier fix for the smbmount race conditions broke the PID
registration with smbfs.  That fix has been backed out and
replaced by a signalling convention from the child smbmount
process back to the parent telling the parent when it is safe
to exit.

2)  Fixing all of this uncovered a NASTY deadly embrace between smbmount,
smbmnt, and autofs.  This was caused by the setsid call in the
daemon code.  The smbmnt process no longer was registered as
"magic" because it was no longer in the autofs process group.
Many many kudos and thanks to H Peter Anvin for giving me the
clue to solving this agravating puzzle.  The setsid was moved
down the where the child signals the parent and a warn left in
its place in the daemonize code.

3)  Fixed (actually worked around with a BUTT UGLY HACK) a problem with
SMB_GET_MOUNTPID in smbumount.c.  The smb_fs.h header file has
the parameter to this ioctl defined as a uid_t.  Unfortunately
that's a 32 bit quantity under glibc and it's currently a 16 bit
quantity in kernel space.  Undefined the macro and redefined
it with a parameter of __kernel_uid_t.  That should keep us
out of trouble till I can have someone fix smb_fs.h in the
kernel sources...

25 years agofix for enumerate domain users (bug spotted by sean matthews).
Luke Leighton [Fri, 29 Jan 1999 21:22:08 +0000 (21:22 +0000)]
fix for enumerate domain users (bug spotted by sean matthews).

also needed to use start index properly and generate next index.

both client and server code need to recognise error code 0x105
when there's not enough room to store all the users in one call.

sort this out another time.

25 years agoremoved encrypt-password code pre-cli_session_setup(), session setup
Luke Leighton [Fri, 29 Jan 1999 19:31:52 +0000 (19:31 +0000)]
removed encrypt-password code pre-cli_session_setup(), session setup
fn decides whether to encrypt password or not.