1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

2300 Commits

Author SHA1 Message Date
Tim Potter
9d4b57069c Use VFS operations for file I/O.
(This used to be commit 20bfa71c95)
1999-04-04 05:32:42 +00:00
Tim Potter
9e071506a1 Added struct vfs_ops describing virtual filesystem operations.
Created constants for pstring and fstring lengths.
(This used to be commit 6998bdbfa8)
1999-04-04 05:29:41 +00:00
Tim Potter
0309a98851 Added configuration parameter 'vfs object' to specify loadable object
file containing a VFS implementation.
(This used to be commit a7af7193e3)
1999-04-04 04:54:50 +00:00
Andrew Tridgell
4c4d72ee17 new files needed by profiling code
(This used to be commit cae71af453)
1999-04-01 05:35:22 +00:00
Andrew Tridgell
d330c907bd Ken McDonell from SGI was interested in adding some profiling
capabilities to Samba so that Samba could talk to the SGI PCP
(Performance Co-Pilot) apps.

This change adds a profiling shared memory area and uses it to count
two fairly trivial things, the number of uid switches and the number
of SMB packets processes. To add more just edit include/profile.h and
then increment it at the right place.

I've also added a -P switch to smbstatus to dump the profile area.
(This used to be commit ef3d61a80a)
1999-04-01 05:22:58 +00:00
Alexandre Oliva
a8aff598f4 declare ttarf as double, as in client.c
(This used to be commit dfcfeb743a)
1999-03-30 10:41:07 +00:00
Alexandre Oliva
d963fb524c use double instead of SMB_BIG_UINT for dir_total and ttarf
(by tridge, merged from branch)
(This used to be commit b482ac8fc4)
1999-03-30 10:25:20 +00:00
Luke Leighton
6ce4aaad2b added SamrQueryDomainInfo call info level 0x3 for kix32.exe support
(This used to be commit ac070dfd39)
1999-03-29 17:24:46 +00:00
Luke Leighton
068e77c861 "User Manager" - create user + change password now work.
next problem: user group adding not supported so an "access denied"
message is reported instead of "ok" when a new user is created.
(This used to be commit f5f61bd477)
1999-03-25 21:32:04 +00:00
Luke Leighton
754be76bde SMB_BIG_INT dir_total incompatible with %d: must use %llu (line 446)
(This used to be commit 1cece21246)
1999-03-25 21:01:08 +00:00
Luke Leighton
3b07eff9ea fixed issues with "Welcome to SAMBA Domain" for when admin user/pass is
used to add workstation to domain.  unix account db not modified: only
SAM password db is used.
(This used to be commit 129a9a4d4b)
1999-03-25 20:56:28 +00:00
Alexandre Oliva
1db113b0a2 * client/client.c (dir_total): use SMB_BIG_UINT
* client/clitar.c (ttarf): ditto
* * lib/snprintf.c: support long longs; adapted from Cloyce D. Spradling's
patch <cloyce@headgear.org>
(This used to be commit 29581f8486)
1999-03-25 20:21:01 +00:00
Luke Leighton
fa01e8764c added SAMR_USER_INFO_24 info level to samr_set_userinfo. this is used
by "Welcome to SAMBA Domain".
(This used to be commit 4aed18b5e1)
1999-03-25 15:14:30 +00:00
Luke Leighton
43a460075a SAM database "set user info".
----------------------------

- removed DOM_RID4

- removed SAMR_UNKNOWN_32

- added SAMR_SET_USERINFO (opcode 0x32)

- added level 0x1 to SAMR_QUERY_DOM_INFO (needed for create user)

- fixed pwdb_gethexpwd() it was failing on XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

- added mod_sam21pwd_entry()

- preparing to call mod_sam21pwd_entry()

- added "user session key" to user_struct.dc.  this is md4(nt#) and is
  needed to decode user's clear-text passwords in SAMR_SET_USERINFO.

- split code out in chgpasswd.c to decode 516 byte password buffers.
(This used to be commit 2e58ed7424)
1999-03-25 13:54:31 +00:00
Luke Leighton
1ad002b749 NULL pointer handling in nt_lm_owf_gen
(This used to be commit 68841eeb64)
1999-03-24 21:23:39 +00:00
Luke Leighton
d4de2b0ae3 matt, you had removed a "pointer" from DOM_R_REF structure which made it
possible to fix lsa_r_lookup_names, but forgot to add that pointer in
to lsa_r_lookup_sids, where DOM_R_REF was also being used.
(This used to be commit 9092368af8)
1999-03-24 21:09:34 +00:00
Luke Leighton
cd7c530f56 removed 2 unnecessary args from make_uni_hdr.
(This used to be commit f84dede27e)
1999-03-24 17:26:08 +00:00
Matthew Chapman
22ab15823f Fixed LSA Lookup Names. There were a few too many NULL pointers in a
negative response, which tended to crash lsass.exe.
(This used to be commit 6d03f61d25)
1999-03-24 12:18:28 +00:00
Luke Leighton
6b9cb3a254 dynamic memory allocation in samr enum dom users. works with 849 entries now.
(This used to be commit 103557e26b)
1999-03-23 20:43:44 +00:00
Matthew Chapman
877db70926 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.
(This used to be commit 90b6fce780)
1999-03-23 15:01:37 +00:00
Matthew Chapman
99020c9b09 ERRmoredata is informational and should not be treated as a hard error
anywhere.
(This used to be commit 71b861f746)
1999-03-23 14:58:26 +00:00
Matthew Chapman
f7f718911b 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.
(This used to be commit 9a482aedb2)
1999-03-23 14:56:25 +00:00
Matthew Chapman
3fa7f643f2 #if defined(HAVE_MYSQL_H) || defined(WITH_MYSQLSAM)
should instead have &&.
(This used to be commit 1143fd4297)
1999-03-23 14:14:12 +00:00
Matthew Chapman
803100197b Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.
(This used to be commit 73730f6004)
1999-03-23 13:45:42 +00:00
Matthew Chapman
5380636c4e If a buffer pointer is NULL then its length_is() attribute should not be
transmitted.

Such a problem was crashing Server Manager.
(This used to be commit 402ed18188)
1999-03-23 02:31:34 +00:00
Matthew Chapman
a4bc522a72 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);
(This used to be commit b9e8a3ef3a)
1999-03-21 13:01:31 +00:00
Matthew Chapman
2a34b224b8 Ensuring return status is aligned in SAMR_QUERY_DISPINFO response.
(This used to be commit 1e17c2529c)
1999-03-21 12:55:18 +00:00
Luke Leighton
da4cd4f5a9 added a "createuser" command.
(This used to be commit fefb4bf191)
1999-03-19 21:20:19 +00:00
Luke Leighton
19e22bc8b6 value->enc_secret not value->secret
(This used to be commit d6cee14f80)
1999-03-19 21:15:03 +00:00
Luke Leighton
5aeb58c285 const char* instead of char* for input
(This used to be commit b51574174c)
1999-03-19 20:58:24 +00:00
Luke Leighton
7a3e8ad097 return type of nt_decrypt_string2 set to BOOL.
(This used to be commit 674e4a3a73)
1999-03-19 20:26:25 +00:00
Luke Leighton
bd76e02ec4 going to start adding inter-domain trust logons soon.
(This used to be commit f9f594c03e)
1999-03-19 15:49:22 +00:00
Luke Leighton
f19e894577 valid_pol in lsa_query_secret() needed to be initialised to False.
(This used to be commit 96e358a2f0)
1999-03-19 15:39:43 +00:00
Matthew Chapman
55bce9e30e querysecret now shows the real, fairdinkum, decrypted secret :-)
(This used to be commit 5951e16a11)
1999-03-19 15:11:07 +00:00
Matthew Chapman
b5a5236f20 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.
(This used to be commit f09388fa6f)
1999-03-19 15:09:25 +00:00
Luke Leighton
fda194255c 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.
(This used to be commit 534fe319d9)
1999-03-19 05:00:39 +00:00
Luke Leighton
6cc71c5354 double-checked the return results from new querysecret command, corrected
my corrections :)
(This used to be commit 082109369b)
1999-03-18 22:13:15 +00:00
Luke Leighton
60d632173b 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.
(This used to be commit 60da0a1255)
1999-03-18 22:12:05 +00:00
Matthew Chapman
f7eaf17216 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.
(This used to be commit 113d03a38a)
1999-03-18 09:36:43 +00:00
Matthew Chapman
eb82f27bd1 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 900238a661)
1999-03-18 06:30:27 +00:00
Matthew Chapman
e8ac69c168 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 365fa3b5fb)
1999-03-18 05:16:59 +00:00
Luke Leighton
5a6db490ea SAMLOGON query - alignment issue is beginning to get to me.
(This used to be commit baf55934dc)
1999-03-17 21:35:10 +00:00
Luke Leighton
7f02de406d Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8.
(This used to be commit 4bb74fcc71)
1999-03-17 19:49:14 +00:00
Luke Leighton
7f913623be alignment issue for UDP SAMLOGON response.
(This used to be commit 9d01e9d86a)
1999-03-17 19:48:29 +00:00
Matthew Chapman
517aade8bd Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Needed during preliminary part of SAM replication.
(This used to be commit 03e722cdf5)
1999-03-16 06:24:24 +00:00
Matthew Chapman
a6fa61afd2 Don't forget to make proto.
(This used to be commit c95520eae9)
1999-03-14 01:25:11 +00:00
Luke Leighton
f37d96a8c0 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 81b5304fe5)
1999-03-12 19:53:28 +00:00
Luke Leighton
c4241b5662 cli_setup_creds new arguments added.
(This used to be commit 5fa3a3f710)
1999-03-12 19:37:40 +00:00
Luke Leighton
6e88171bac new "domtrust" test command. r&d into inter-domain trust accounts.
(This used to be commit 65b0abe8b7)
1999-03-12 05:47:06 +00:00
Luke Leighton
0aaf5a368c check for exactly _one_ key: for USRMGR.EXE.
(This used to be commit 478d9ddfcf)
1999-03-12 05:46:10 +00:00
Luke Leighton
6a4239c8b0 static password space needed.
(This used to be commit 5b1d078900)
1999-03-10 17:32:41 +00:00
Luke Leighton
2aadefe8cc Greg Dickie: spotted bug where smb_nt_passwd could be NULL.
(This used to be commit d8946f1cc7)
1999-03-10 17:06:07 +00:00
Luke Leighton
a18c6ba9a4 Greg Dickie spotted some wierd memory corruption problem with group
database enumeration.
(This used to be commit b0381bb262)
1999-03-09 23:22:36 +00:00
Luke Leighton
60bfe3819e alignment issue in UDP SAMLOGON response.
(This used to be commit de290627f0)
1999-03-09 02:03:39 +00:00
Luke Leighton
a3c6e96a22 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
(This used to be commit 62d499f832)
1999-03-09 01:21:57 +00:00
Luke Leighton
aecbc5b5d3 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 74c7d626cd)
1999-03-09 01:20:08 +00:00
Luke Leighton
5db005007a oops, IS_BITS_CLR_ALL() macro was wrong!
(This used to be commit a32a6f64b1)
1999-03-09 01:17:42 +00:00
Luke Leighton
b6db424576 reverted access control flags in enum commands.
(This used to be commit 97a0b24955)
1999-03-09 01:17:16 +00:00
Luke Leighton
8cf03d5a39 - 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 1c330d5682)
1999-03-08 19:19:01 +00:00
Luke Leighton
269f11bfa9 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 073c8652c1)
1999-03-08 18:43:50 +00:00
Luke Leighton
76ebe05c18 oops, accidentally committed clear-text password reading last week.
(This used to be commit e0b5a866ce)
1999-03-08 18:42:43 +00:00
Luke Leighton
26c08067f0 Bejamin Kuit. #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found.
(This used to be commit 188d9a75ed)
1999-03-08 18:41:58 +00:00
Luke Leighton
3e99124f21 spelling mistake, #ifdef'd out for non-developers (oops!)
(This used to be commit 167b0b20e3)
1999-03-05 22:37:02 +00:00
Luke Leighton
feff9c69db oops, put -DDEBUG_PASSWORD in wrong place.
(This used to be commit 4e89fbb7d9)
1999-03-05 22:33:32 +00:00
Luke Leighton
caa34b37e4 Benjamin Kuit's mods.
(This used to be commit eb63fbdb68)
1999-03-05 22:03:04 +00:00
Luke Leighton
00d86ccb1c Benjamin Kuit's latest mysql mods. issue with "make proto" needs to be
resolved.
(This used to be commit d59a2e669a)
1999-03-03 20:48:48 +00:00
Luke Leighton
81f866db3a added <mysql.h> autoconf test.
(This used to be commit 511ef8a58c)
1999-03-02 16:43:27 +00:00
Luke Leighton
236cea4efa Benjamin Kuit's MYSQL SAM Database implementation.
Copyright (C) Benjamin Kuit <bj@mcs.uts.edu.au> 1999.
(This used to be commit fdf61e1dab)
1999-03-01 16:31:14 +00:00
Luke Leighton
2dd4c985c0 improving syntax / useability of rpcclient "shutdown" command:
rpcclient [-m messsage] [-t timeout] [-r or --reboot].
(This used to be commit 8b859797aa)
1999-03-01 16:01:45 +00:00
Matthew Chapman
869f9860eb Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending on
whether the client supports 32-bit error codes.
(This used to be commit cb5428308d)
1999-02-24 19:08:43 +00:00
Matthew Chapman
7f88bf771a 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 d1cc33bcb6)
1999-02-24 01:58:08 +00:00
Matthew Chapman
05f772b431 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 7d03e6e219)
1999-02-24 01:52:30 +00:00
Luke Leighton
1e71ecdcb2 added jeremy's new c++-like code for parsing of security descriptors.
(This used to be commit ec1b7000fd)
1999-02-23 22:39:54 +00:00
Luke Leighton
5c5f544538 samr_lookup_names "none found" error needed corrections with empty lists.
(This used to be commit e164b5080c)
1999-02-19 17:41:05 +00:00
Luke Leighton
0cfca572c9 last unix group not being listed. spotted by jacques sansdrap.
(This used to be commit 2d5fc5c7cf)
1999-02-19 15:46:38 +00:00
Luke Leighton
b52903aefe problem been there for months: reg_r_info not aligning after string buffer.
(This used to be commit 66e2787ab7)
1999-02-18 18:50:44 +00:00
Michael Warfield
894a824041 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 329ceaee49)
1999-02-18 04:33:06 +00:00
Luke Leighton
52fb07aea2 rpcclient shutdown command
(This used to be commit 59f081069a)
1999-02-16 18:04:21 +00:00
Luke Leighton
78314c2e32 bitmap to strings
(This used to be commit ba5919bcae)
1999-02-16 18:02:50 +00:00
Matthew Chapman
2737f26ad6 Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
(This used to be commit ce24191939)
1999-02-15 05:33:30 +00:00
Matthew Chapman
0baa42bdd7 Always null-terminate strings.
(This used to be commit b314430b21)
1999-02-15 05:31:52 +00:00
Michael Warfield
e588ffdaa8 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 ad8389804c)
1999-02-14 23:15:54 +00:00
Michael Warfield
cbbac5455c Fixed a glibc glitch in smbumount.c and reenabled some debugging
in smbmount.c
(This used to be commit 4b4a706213)
1999-02-13 18:36:49 +00:00
Luke Leighton
b8082d0840 const cast issues. [p.s - tidy work, matt!]
(This used to be commit dad5baef19)
1999-02-12 15:35:27 +00:00
Luke Leighton
4f20234c78 const issues with byte mod / byte read macros.
(This used to be commit 98ecb88704)
1999-02-12 15:34:57 +00:00
Matthew Chapman
2b8292075c Cut and paste error.
(This used to be commit 9ea91d89d2)
1999-02-12 03:09:24 +00:00
Matthew Chapman
fd96929ec1 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 a1d39af1ce)
1999-02-12 00:16:09 +00:00
Luke Leighton
f38bfc7d9a UNICODE issues.
(This used to be commit 6a437cfb33)
1999-02-11 22:12:49 +00:00
Luke Leighton
c6d16eea43 the UNICODE issue...
(This used to be commit 73db80f341)
1999-02-11 18:50:13 +00:00
Luke Leighton
0e402f197d 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 b5396d3c6d)
1999-02-11 18:48:18 +00:00
Luke Leighton
f02321a998 refinement of random ipc$ SMBtrans torture test. send requests, and
don't wait for responses :-)
(This used to be commit c1d65e9060)
1999-02-11 18:35:26 +00:00
Luke Leighton
a71d268114 uninitialised pointer being freed if lookupnames failed. oops.
(This used to be commit d77de86858)
1999-02-11 17:25:26 +00:00
Luke Leighton
8b6b6b57b5 use jeremy's versions of the UNICODE routines.
(This used to be commit c5109ff782)
1999-02-10 22:30:47 +00:00
Luke Leighton
7a65924133 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 3072044134)
1999-02-09 22:13:20 +00:00
Luke Leighton
4cb18cd734 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 56469578a1)
1999-02-09 21:56:06 +00:00
Luke Leighton
96983a13ba 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 fcaa121441)
1999-02-09 21:42:39 +00:00
Luke Leighton
748f296a76 removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate.
(This used to be commit ac72fe1ab3)
1999-02-09 19:51:44 +00:00
Luke Leighton
3b12477f34 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 ddd3501982)
1999-02-09 16:01:28 +00:00
Matthew Chapman
bfff648f38 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 30a085bf80)
1999-02-09 03:57:10 +00:00
Luke Leighton
99a9b0f7c4 UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()
(This used to be commit 9084b7e33d)
1999-02-08 23:40:49 +00:00
Luke Leighton
37c9693fc8 reload_services needs to be called prior to init_files but after
get_myname.
(This used to be commit 9ab81caa06)
1999-02-08 01:46:46 +00:00
Luke Leighton
6d698d51b3 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 d455c9d2c9)
1999-02-08 00:24:57 +00:00
Luke Leighton
ceef08b60e initialise my name (used in %h) prior to loading smb.conf files.
(This used to be commit ed128c38a8)
1999-02-03 17:10:44 +00:00
Luke Leighton
91403ea47d %s not $s
(This used to be commit 62118e15fe)
1999-02-03 16:30:54 +00:00
Luke Leighton
f61fc8923d 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 5b9a7278da)
1999-02-03 01:58:52 +00:00
Luke Leighton
1153f00f88 cache unix groups so that two-level getgrent calls don't occur.
(This used to be commit f7dfa55a2e)
1999-02-03 00:49:24 +00:00
Luke Leighton
fe609d810e multiple dce/rpc PDUs failed to work after ntlmssp update was added.
(This used to be commit f082f07e76)
1999-02-03 00:48:27 +00:00
Luke Leighton
07948f3f2d server type announcements modified to include the "role" of the server:
domain member, pdc, bdc.
(This used to be commit d95bb252f8)
1999-02-02 19:53:10 +00:00
Michael Warfield
8fdc846070 Minor change to bring smbmount in the main branch in line with some bzero
to memset changes...
(This used to be commit 1cb8fcb33b)
1999-02-01 22:01:29 +00:00
Luke Leighton
68a1171c82 comma after DOM_MAP_USER removed
(This used to be commit ce1ae86cbd)
1999-02-01 16:32:01 +00:00
Matthew Chapman
1cf9521b2d Must set password length to 24 after we encrypt a password.
(This used to be commit af83778abc)
1999-02-01 05:25:54 +00:00
Matthew Chapman
c80c2e0d9e 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 1e3873111f)
1999-02-01 02:39:37 +00:00
Matthew Chapman
960c760be0 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 e9c79c85e6)
1999-02-01 02:37:45 +00:00
Matthew Chapman
90b7084738 Added init_nt_time function which initialises an NTTIME to -1.
(This used to be commit e1e3875057)
1999-02-01 02:36:24 +00:00
Michael Warfield
f5ac863e5a 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 c5608093e4)
1999-01-31 21:28:55 +00:00
Luke Leighton
9b5043cb2f 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 ad58cdfac6)
1999-01-29 21:22:08 +00:00
Luke Leighton
5a9859c7b0 removed encrypt-password code pre-cli_session_setup(), session setup
fn decides whether to encrypt password or not.
(This used to be commit 6d14db6a6c)
1999-01-29 19:31:52 +00:00
Luke Leighton
206013169c uni_svc_name not uni_srv_name
(This used to be commit 14080a564a)
1999-01-29 19:20:27 +00:00
Luke Leighton
6b7e1ead37 rpcclient "Service Control Manager" svcenum [-i] command.
(This used to be commit a022710f1e)
1999-01-28 21:11:15 +00:00
Luke Leighton
92aca8b1b7 error code cleanup
(This used to be commit 61c40982d6)
1999-01-28 21:10:38 +00:00
Luke Leighton
deb61cb44b 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 17f4c5a785)
1999-01-28 18:40:53 +00:00
Luke Leighton
0504064085 Service Control Manager - service enumeration.
(This used to be commit f4dd8f6b56)
1999-01-27 20:31:58 +00:00
Luke Leighton
f6c646467d set_port warning / unused / global/local variable overlap issues
cmd_svcctl.c tests got put into cvs by mistake.
(This used to be commit 0ed70972d7)
1999-01-27 19:37:29 +00:00
Christopher R. Hertel
4423c27fe5 Fuss fuss fuss.
Added missing default: statements to two switch blocks.

Chris -)-----
(This used to be commit 0681f6946b)
1999-01-27 18:22:48 +00:00
Luke Leighton
4af8d7aa29 - 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 2a509e9606)
1999-01-27 00:08:33 +00:00
Luke Leighton
0637d46d60 compilation errors due to addition of smb file handle parameter.
(This used to be commit 03967986ec)
1999-01-27 00:03:31 +00:00
Richard Sharpe
f5f913b001 Putting back the -p flag in smbclient.
However, it seems that the -s flag
in smbclient is also ignored :-(
(This used to be commit f6c7819266)
1999-01-25 01:46:14 +00:00
Richard Sharpe
444dc51920 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 3598d90a32)
1999-01-25 00:36:45 +00:00
Richard Sharpe
9a00d10716 Fixing up configure to properly support ssl
(This used to be commit 524c4d2978)
1999-01-24 14:20:19 +00:00
Richard Sharpe
775bff681c 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 fb6048bb86)
1999-01-24 14:08:55 +00:00
Matthew Chapman
b4e34006e8 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 63d7822b9d)
1999-01-18 01:35:43 +00:00
Matthew Chapman
e10503d1a2 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 f530e289c6)
1999-01-18 01:32:45 +00:00
Richard Sharpe
8dac09c5a1 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 57301a3eb4)
1999-01-17 01:03:52 +00:00
Matthew Chapman
2cc786548b 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 15bd172530)
1999-01-15 05:09:36 +00:00
Matthew Chapman
837601c9df Fixed typo in srv_samr.c where samr_add_groupmem and samr_del_groupmem were
the wrong way around.
(This used to be commit 2b6f481885)
1999-01-15 05:02:41 +00:00
Matthew Chapman
c35bf45785 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 91c77f5432)
1999-01-15 05:00:26 +00:00
Gerald Carter
b86b8a3ea8 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 175e598dcc)
1999-01-13 00:48:25 +00:00
Gerald Carter
7ff9823689 fixed an uninitialized variable in lookupsmbgrpgid() and
lookupsmbpwuid that was causing a SEGFAULT in smbd.
(This used to be commit cabc7e739c)
1999-01-13 00:40:04 +00:00
Christopher R. Hertel
8cb794707b While writing the man page, I realized that it was a bit silly not to accept
command-line parameters.  I've added that capability.  Of course, the man
page is now wrong.  Sigh.

Chris -)-----
(This used to be commit 300a8c9e50)
1998-12-29 20:43:01 +00:00
Christopher R. Hertel
7bf6e4d6a0 Sorry that this is going so slowly.
I've added debug2html to Makefile.in so that it compiles as part of the
normal build.  Fixed a typo in debug2html.c as well.

One problem:  I found it necessary to link with both $(PARAM_OBJ) and
              $(LIB_OBJ).  The result is an executable that is much larger
              than it really needs to be.
(This used to be commit d2d6f0bf36)
1998-12-28 22:34:08 +00:00
Luke Leighton
0504d696f8 fix for potential lsass.exe crashing due to negative response from
LsaLookupNames being incorrect.  this is a bit wierd: why would the
lsass.exe on the nt _client_ crash due to an LsaLookupNames response
from a samba _server_?
(This used to be commit a15a3f95f2)
1998-12-20 00:37:24 +00:00
Luke Leighton
edc708db02 adding start of remote lookup for domain member role.
(This used to be commit 090512e187)
1998-12-20 00:35:43 +00:00
Luke Leighton
a8e2698306 lib_sec_ctxt.o not .c
(This used to be commit 2485b8e706)
1998-12-20 00:31:18 +00:00
Richard Sharpe
ddfe1d35fc Fixed problems in debug code because I did not compile
first :-(
(This used to be commit 47e36bed8f)
1998-12-19 02:08:35 +00:00
Richard Sharpe
a7e4be0e78 Added some debugging to clitar ...
(This used to be commit b75af70990)
1998-12-19 01:43:24 +00:00
Jeremy Allison
d5791b826d Fixed tar recurse bug.
Jeremy.
(This used to be commit 7be5c8e8f7)
1998-12-17 22:44:56 +00:00
Jeremy Allison
3e7039349f Fix bug with nmbd running wild due to recursion in retransmit_or_expire_response_records().
Jeremy.
(This used to be commit d5f05b4fae)
1998-12-17 21:41:28 +00:00
Andrew Tridgell
d973a107a2 and in head branch:
make sure we include sys/mman.h if available
(This used to be commit ccf6443887)
1998-12-17 01:04:38 +00:00
Christopher R. Hertel
dc003d8d40 A while back, Andrew and I talked about making the debug parsing code a
better "fit" with other Samba code.  This is a small first step toward
doing what (I think) we agreed to do.

I've moved the key function from ubiqx/debugparse.c into lib/debug.c.  I
have also moved the enum from ubiqx/debugparse.h into the debug section in
smb.h.

The next thing to do is to get debug2html added into the Makefile.in so
that it is always produced when compiling the suite.

Chris -)-----
(This used to be commit 782474f41e)
1998-12-16 18:50:54 +00:00
Andrew Tridgell
5377f7ab3b on Linux force fcntl/mmap based shared memory and on other systems
force IPC/shmem based shared memory.
(This used to be commit ef5f752a4a)
1998-12-15 03:16:24 +00:00