samba.git
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.
(This used to be commit 900238a66153c276d63780e3264651089291d185)

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.
(This used to be commit 365fa3b5fbf551670acc91f593138a7e91a5f7fa)

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.
(This used to be commit baf55934dc5118f8c423fe05c0e4b8d7c018fa14)

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.
(This used to be commit 4bb74fcc714fccac791ce86c8882d19d704b17a1)

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.
(This used to be commit 9d01e9d86a8d22a283a8377a12bb175398547d78)

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.
(This used to be commit 03e722cdf502491d09d4c5eb9024d837ae10ab32)

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.
(This used to be commit c95520eae9eecc2ec0a347dc0212d6983c5c7f2c)

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.
(This used to be commit 81b5304fe5ea518680b2516e2da39f31c1d05afb)

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.
(This used to be commit 5fa3a3f710cfd3a51641d560a96bd08f92afca32)

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.
(This used to be commit 65b0abe8b7594ff6c662da86dc2e35bd83a2d13d)

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.
(This used to be commit 478d9ddfcf59e3d847d83947c8d4f0bf84f26833)

25 years agostatic password space needed.
Luke Leighton [Wed, 10 Mar 1999 17:32:41 +0000 (17:32 +0000)]
static password space needed.
(This used to be commit 5b1d0789007bfcb09326643eb271746cee386846)

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.
(This used to be commit d8946f1cc7b77b06f346344ffdb4772e6d225396)

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.
(This used to be commit b0381bb262f51fca916fb951fc0c7e54a58e2dd3)

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.
(This used to be commit de290627f06915d420d37d2a3ac2f736c4cf8d74)

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.
(This used to be commit 62d499f83256c6e8b3308dc4bd8e9f5df873b14b)

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.
(This used to be commit 74c7d626cd85189c902489d220c3eca30a4b1bb1)

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!
(This used to be commit a32a6f64b187e82f88eaccb6a2a88902be5cc4e0)

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.
(This used to be commit 97a0b24955b45e434e34510f65afdde7bfdf3183)

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.
(This used to be commit 1c330d568225759950401cfb98fe9e99db81419c)

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.
(This used to be commit 073c8652c13408b883fc73203e5558b1a9a64d62)

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.
(This used to be commit e0b5a866ce2628a5e152af3ef817ee3124e60500)

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.
(This used to be commit 188d9a75edb41e8a0cc0ea6e17c9497771cf3b96)

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!)
(This used to be commit 167b0b20e33bef4af5deaff961937dd5fadf481d)

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.
(This used to be commit 4e89fbb7d9c2c8e776ab0a819cbf1a1294f07c1b)

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

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.
(This used to be commit d59a2e669aed7ee33fdca8b8ec126b1c0a984981)

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.
(This used to be commit 511ef8a58ccfc04d0744f28753bb48d848851980)

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.
(This used to be commit fdf61e1dabc2c977ee5cf1e9d60e3380f19840da)

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].
(This used to be commit 8b859797aaa1b88cb1a932fed97b4c3ea2dbdde2)

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)
(This used to be commit 644cda5d807d875c956e71a6e49d65c2d7f0d61e)

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.
(This used to be commit cb5428308d6978f7bd76c1b878dd4a43135a274d)

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.
(This used to be commit d1cc33bcb61305cc9a6e21886237fa291eda9427)

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.
(This used to be commit 7d03e6e21908f3a759a4e65c5edd850622335e3e)

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.
(This used to be commit ec1b7000fd88c5a08e438c7033f60e49b9ec44a8)

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.
(This used to be commit e164b5080ca966de4227277f7ac031bc96d056ad)

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.
(This used to be commit 2d5fc5c7cf2086c396c853c13a3409bfac77d05c)

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.
(This used to be commit 66e2787ab7db72fb654b995280b294738e77e50a)

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.
(This used to be commit 329ceaee49fa0175f78873433bd942865309f633)

25 years agorpcclient shutdown command
Luke Leighton [Tue, 16 Feb 1999 18:04:21 +0000 (18:04 +0000)]
rpcclient shutdown command
(This used to be commit 59f081069a58f6a070ed6016c06153d5e695da93)

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

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.
(This used to be commit ce24191939b82985d09eabe945199f38b0fea486)

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

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-
(This used to be commit ad8389804cec6c6bf04601a1d7bb3fb7aa8c2274)

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.
(This used to be commit 1041d53ec246debac0050bdc7e9a6cd72e9ecf49)

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
(This used to be commit 4b4a706213032ad49a0653e80721bac5f6284f90)

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!]
(This used to be commit dad5baef194b18c674c0d908a0e0714c0a1aefa4)

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.
(This used to be commit 98ecb88704c3db26de8b548f4f1526f23401a161)

25 years agoCut and paste error.
Matthew Chapman [Fri, 12 Feb 1999 03:09:24 +0000 (03:09 +0000)]
Cut and paste error.
(This used to be commit 9ea91d89d2a1baa67f5143ecc08eb60c93213242)

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).
(This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e)

25 years agoUNICODE issues.
Luke Leighton [Thu, 11 Feb 1999 22:12:49 +0000 (22:12 +0000)]
UNICODE issues.
(This used to be commit 6a437cfb33f24913e0c1f8484c0b08ef317e513b)

25 years agothe UNICODE issue...
Luke Leighton [Thu, 11 Feb 1999 18:50:13 +0000 (18:50 +0000)]
the UNICODE issue...
(This used to be commit 73db80f34183324845407b00f58462ff2d7b47ea)

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.
(This used to be commit b5396d3c6de4b8cb0e981bab10367e5838f78a53)

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 :-)
(This used to be commit c1d65e906054297e42d6d177194d3b9ab16c7e35)

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.
(This used to be commit d77de868588b6291353fa7a426b6e5da4b5f2c49)

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.
(This used to be commit c5109ff782be8774db47a92b48ca6335ec8d6065)

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.
(This used to be commit 3072044134eadbf46350b32c1ed0703681b0d590)

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.
(This used to be commit 56469578a1af0fbcf6edddf94c498c7bbfb385c6)

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.
(This used to be commit fcaa1214412f5a417a648d4da5c4332f75f59f57)

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.
(This used to be commit ac72fe1ab3d10f64a5945ccbd4ed3817e30f9f7b)

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.
(This used to be commit ddd350198202d6a1d2c715b3dce7db3a5d76a63a)

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.
(This used to be commit 30a085bf80982c619cd78aee9ad410ece5f88679)

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()
(This used to be commit 9084b7e33dfe717bd8d5604ee71d137e3baef0f5)

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.
(This used to be commit 9ab81caa065a0e08368fc9137d42ed810fd4b817)

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.
(This used to be commit d455c9d2c9f60289d78d0331228f5922152070bf)

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.
(This used to be commit ed128c38a88746ec7822d598e72f0106a30a4af7)

25 years ago%s not $s
Luke Leighton [Wed, 3 Feb 1999 16:30:54 +0000 (16:30 +0000)]
%s not $s
(This used to be commit 62118e15fed8c9a7e13705842d0ae59669a2dd8f)

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)
(This used to be commit 5b9a7278da4a25ea217f914c8daae31238fa5cfe)

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.
(This used to be commit f7dfa55a2e191ae780d399026bce48f68cda4bf0)

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.
(This used to be commit f082f07e764c04b75b6880f852b80faec86f1b1c)

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.
(This used to be commit d95bb252f838b3612f5eba5d2b61d7b38b01f5ef)

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...
(This used to be commit 1cb8fcb33bb9e930d8f3cba4cc1ba5aa880c5f8e)

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
(This used to be commit ce1ae86cbd8dec18ff981d1fce05ed660e263f38)

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.
(This used to be commit af83778abc5fae0df53ed1874181e33bc8de8d94)

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?).
(This used to be commit 1e3873111faf352ef14a098eff250b505ab0b800)

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);
  ... )
(This used to be commit e9c79c85e6d1352693ab13e907b07d4706975891)

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.
(This used to be commit e1e3875057bed830fdc0aaa9c85f04a1479fd64a)

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...
(This used to be commit c5608093e48ed7fd3b7a1e2a4b1af7e4e59fc2f9)

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.
(This used to be commit ad58cdfac6b85d9431216e32e532ad4d60f9c6dd)

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.
(This used to be commit 6d14db6a6c101e86b3c62d5098a05d29ae4e9cd8)

25 years agouni_svc_name not uni_srv_name
Luke Leighton [Fri, 29 Jan 1999 19:20:27 +0000 (19:20 +0000)]
uni_svc_name not uni_srv_name
(This used to be commit 14080a564a24f8f35cb8711b912c46f7243cd723)

25 years agorpcclient "Service Control Manager" svcenum [-i] command.
Luke Leighton [Thu, 28 Jan 1999 21:11:15 +0000 (21:11 +0000)]
rpcclient "Service Control Manager" svcenum [-i] command.
(This used to be commit a022710f1e3996ecbe6bbe035e1df0bc4c050b34)

25 years agoerror code cleanup
Luke Leighton [Thu, 28 Jan 1999 21:10:38 +0000 (21:10 +0000)]
error code cleanup
(This used to be commit 61c40982d6fde34729dc6850cf3372482392f4c9)

25 years agoreturned cli_session_setup to previous behaviour. added a couple of
Luke Leighton [Thu, 28 Jan 1999 18:40:53 +0000 (18:40 +0000)]
returned cli_session_setup to previous behaviour.  added a couple of
validation checks and also added capability to send plaintext passwords.
send "ntpasslen" of zero to do this.  sending same plaintext password
for pass and ntpass arguments will result in previous behaviour of
encrypting password if server supports it.
(This used to be commit 17f4c5a785cf20901bcb76510e5ea9b0a6928115)

25 years agoService Control Manager - service enumeration.
Luke Leighton [Wed, 27 Jan 1999 20:31:58 +0000 (20:31 +0000)]
Service Control Manager - service enumeration.
(This used to be commit f4dd8f6b566961890b2933b7a413241bf9b93797)

25 years agoset_port warning / unused / global/local variable overlap issues
Luke Leighton [Wed, 27 Jan 1999 19:37:29 +0000 (19:37 +0000)]
set_port warning / unused / global/local variable overlap issues

cmd_svcctl.c tests got put into cvs by mistake.
(This used to be commit 0ed70972d72533558f0fdd43e6ec95ac2102b9d0)

25 years agoFuss fuss fuss.
Christopher R. Hertel [Wed, 27 Jan 1999 18:22:48 +0000 (18:22 +0000)]
Fuss fuss fuss.

Added missing default: statements to two switch blocks.

Chris -)-----
(This used to be commit 0681f6946be2f7b528a1efb6adcc2366a2951644)

25 years ago- got client code cleartext passwords working again in cli_session_setup.
Luke Leighton [Wed, 27 Jan 1999 00:08:33 +0000 (00:08 +0000)]
- got client code cleartext passwords working again in cli_session_setup.
  needed this for some tests.

- removed code that said "if lm password is not encrypted then encrypt both
  lm and nt passwords".  actually it said "if lm password length is not 24
  bytes and we're in security=user mode..."

  it didn't bother to check whether the nt password was NULL or not, and
  doing the encryption inside cli_session_setup is the wrong place.

- checked all instances where cli_session_setup is called with cleartext
  passwords that are expected to then be encrypted (see above) with the
  test "if pwlen != 24...".  there was only one: all the others either
  provide encrypted passwords, do null sessions or use
  cli_establish_connection.

* recommendation: use cli_establish_connection() in smbwrapper/smbw.c
(This used to be commit 2a509e9606f8aefbefa6e7b49878726464dbed44)

25 years agocompilation errors due to addition of smb file handle parameter.
Luke Leighton [Wed, 27 Jan 1999 00:03:31 +0000 (00:03 +0000)]
compilation errors due to addition of smb file handle parameter.
(This used to be commit 03967986ec6a92785b92fefce9e27b8bb088ea85)

25 years agoPutting back the -p flag in smbclient.
Richard Sharpe [Mon, 25 Jan 1999 01:46:14 +0000 (01:46 +0000)]
Putting back the -p flag in smbclient.

However, it seems that the -s flag
in smbclient is also ignored :-(
(This used to be commit f6c78192664d611d4663ed7459a2789315861eec)

25 years agoMore changes to get SSL working with 2.x.x
Richard Sharpe [Mon, 25 Jan 1999 00:36:45 +0000 (00:36 +0000)]
More changes to get SSL working with 2.x.x

Now, we have most of the configure support done, next
have to fix Makefile.in and other things ...
(This used to be commit 3598d90a325eaf90341832c1aa35ad17f6d34af7)

25 years agoFixing up configure to properly support ssl
Richard Sharpe [Sun, 24 Jan 1999 14:20:19 +0000 (14:20 +0000)]
Fixing up configure to properly support ssl
(This used to be commit 524c4d2978f8b951708ad30316e3d69ed1c39b75)

25 years agoAdding first of the fixes for SSL.
Richard Sharpe [Sun, 24 Jan 1999 14:08:55 +0000 (14:08 +0000)]
Adding first of the fixes for SSL.

A whole bunch of string variables in loadparm.c were
not being initialized properly.  Programs crashed as a result.

This set of code not tested, but same code tested elsewhere,
and all this guarded by #ifdef HAVE_SSL
(This used to be commit fb6048bb8655e8bd87cc69b48c99219d6701a907)

25 years agoIn security=user mode we must allow cli_connect_serverlist to connect to our
Matthew Chapman [Mon, 18 Jan 1999 01:35:43 +0000 (01:35 +0000)]
In security=user mode we must allow cli_connect_serverlist to connect to our
own smbd process, rather than complaining about a password server loop.
(This used to be commit 63d7822b9d87d085194de6895d3e271cedcd3c9a)

25 years agoAdded load_interfaces in smbpasswd to allow name resolution by broadcast and
Matthew Chapman [Mon, 18 Jan 1999 01:32:45 +0000 (01:32 +0000)]
Added load_interfaces in smbpasswd to allow name resolution by broadcast and
multiple interfaces. (Jeremy already committed this in SAMBA_2_0).
(This used to be commit f530e289c6f69961c51511e0220fdd886fbd2c78)

25 years agoA small change to clitar.c (really, I promise :-)
Richard Sharpe [Sun, 17 Jan 1999 01:03:52 +0000 (01:03 +0000)]
A small change to clitar.c (really, I promise :-)

If we are writing the tar file to stdout, set dbf to stderr
so that we do not screw up tar output with log info etc.

Compiles clean and tested with 38MB backup. Honest :-)
(This used to be commit 57301a3eb4723d0790822d3409da788fec4d8378)

25 years agoeclass != ERRDOS && num != ERRmoredata
Matthew Chapman [Fri, 15 Jan 1999 05:09:36 +0000 (05:09 +0000)]
eclass != ERRDOS && num != ERRmoredata
is not the same as
!(eclass == ERRDOS && num == ERRmoredata)

This was causing smbclient to segfault on receiving certain errors.
(This used to be commit 15bd172530af360cf16ad626330dfe2ea92100df)

25 years agoFixed typo in srv_samr.c where samr_add_groupmem and samr_del_groupmem were
Matthew Chapman [Fri, 15 Jan 1999 05:02:41 +0000 (05:02 +0000)]
Fixed typo in srv_samr.c where samr_add_groupmem and samr_del_groupmem were
the wrong way around.
(This used to be commit 2b6f4818858d422399321064245a36be1dba9738)

25 years agoFinally committing my LDAP changes.
Matthew Chapman [Fri, 15 Jan 1999 05:00:26 +0000 (05:00 +0000)]
Finally committing my LDAP changes.

* Added new APIs for modifying groups.
* RIDs are allocated similarly to NT, starting from 1000 and incrementing by 1
  for each new user/group.
* RIDs are now consistently in hex

* Fixed bugs reported by Allan Bjorklund <allan@umich.edu>:
   - ldap_close_connection is exported by OpenLDAP - changed to ldap_disconnect
   - Missing ldap_connect() in getusergroups functions
   - ldap_next_entry was being called too early while retrieving a sam_struct
   - LDAP globals should be extern in sampassldap.c

* Fixed bugs reported by Martin Hofbauer <mh@bacher.at>
   - Newly added workstation trust accounts had attributes DU rather than W.
   - User dn's were forced to start with "uid=XX" rather than using the existing
     dn.
(This used to be commit 91c77f5432169553572bb4d85ad5f09d17524f20)

25 years agoFixed the "You password will expire in 0 days. Would you like to
Gerald Carter [Wed, 13 Jan 1999 00:48:25 +0000 (00:48 +0000)]
Fixed the "You password will expire in 0 days.  Would you like to
change it now?" message when you login to a Samba Controlled domain.

The fix is a hard coded 42 days from right now until you need to
change you pasword again time (see passdb/sampassdb.c:pwdb_smb_to_sam())

Also fixed getsmbfilepwent() so that it will read in the last password
change time correctly.

* Related to this lib/util_pwdb.c:StrnCaseCmp() returns 0 if the
strings match.  Chouldn't this be the pther way?  Oh well.  I
didn't change the return code as it was used in several
other cases (see lib/util_pwdb.c:pwdb_get_last_set_time())
(This used to be commit 175e598dccd042c0f8b045db45fbe3ae928a7387)