samba.git
26 years agoThis commit was manufactured by cvs2svn to create tag samba-1.9.18alpha5
cvs2svn Import User [Sat, 25 Oct 1997 19:13:08 +0000 (19:13 +0000)]
This commit was manufactured by cvs2svn to create tag
'release-1-9-18alpha5'.

26 years agopreparing for release of 1.9.18alpha5
Samba Release Account [Sat, 25 Oct 1997 19:13:07 +0000 (19:13 +0000)]
preparing for release of 1.9.18alpha5

26 years agoupdated to describe smbclient work recently done.
Luke Leighton [Sat, 25 Oct 1997 18:13:04 +0000 (18:13 +0000)]
updated to describe smbclient work recently done.

26 years agolatest version
Luke Leighton [Sat, 25 Oct 1997 17:59:01 +0000 (17:59 +0000)]
latest version

26 years agooops!
Luke Leighton [Sat, 25 Oct 1997 17:58:53 +0000 (17:58 +0000)]
oops!

26 years agoadded correct client-side credential generation / checking to the LSA SAM
Luke Leighton [Sat, 25 Oct 1997 17:38:37 +0000 (17:38 +0000)]
added correct client-side credential generation / checking to the LSA SAM
Logon query.  i think i even got the client-side checking of the response
credentials right!

26 years agogot the SAM logon request generated, and received a SAM logon response back.
Luke Leighton [Sat, 25 Oct 1997 15:49:27 +0000 (15:49 +0000)]
got the SAM logon request generated, and received a SAM logon response back.
YEAH!

need to add:

- client-side credential calculation
- client-side parsing of the SAM logon response.

26 years agosam logon query creation functions. written twice because i deleted it.
Luke Leighton [Sat, 25 Oct 1997 13:15:52 +0000 (13:15 +0000)]
sam logon query creation functions.  written twice because i deleted it.

26 years agoMakefile :
Luke Leighton [Sat, 25 Oct 1997 10:58:18 +0000 (10:58 +0000)]
Makefile :

adding bits for new nt domain code

byteorder.h :

trying to get macros right, and not to crash on SUNOS5...

client.c :

added #ifdef NTDOMAIN, and created do_nt_login() function.  don't
want to have to recompile client.c unless absolutely necessary.

credentials.c :

moved deal_with_creds() [possibly inappropriately] into credentials.c

ipc.c reply.c server.c uid.c :

attempting to make (un)become_root() functions calleable from smbclient.
this is a little tricky: smbclient might have to be another setuid
root program, immediately setuid'ing to non-root, so that we can
reset-uid to root to get at the smbpasswd file.  or, have a secure
pipe mechanism to smbd to grab smbpasswd entries.  or the like.

smbdes.c smbencrypt.c :

created a function to generate lm and nt owf hashes.

lsaparse.c ntclient.c smbparse.c :

added nt client LSA_AUTH2 code.  it works, too!

pipenetlog.c pipentlsa.c pipesrvsvc.c :

simplification.  code-shuffling.  getting that damn offset right
for the opcode in RPC_HDR.

smb.h :

changed dcinfo xxx_creds to DOM_CRED structures instead of DOM_CHAL.
we might need to store the server times as well.

proto.h :

the usual.

26 years agoupdate SGI build files to latest source
Herb Lewis [Fri, 24 Oct 1997 18:41:08 +0000 (18:41 +0000)]
update SGI build files to latest source

26 years agopreparing for release of 1.9.18alpha4
Samba Release Account [Fri, 24 Oct 1997 14:40:37 +0000 (14:40 +0000)]
preparing for release of 1.9.18alpha4

26 years agopreparing for release of samba-1.9.18alpha4
Samba Release Account [Fri, 24 Oct 1997 14:39:28 +0000 (14:39 +0000)]
preparing for release of samba-1.9.18alpha4

26 years agoupdated to reflect the current state of play:
Luke Leighton [Fri, 24 Oct 1997 14:36:10 +0000 (14:36 +0000)]
updated to reflect the current state of play:

- jeremy's nmbd restructure (wins client / wins server stuff)
- which parameters are documented in smb.conf and which aren't
- mentioning the new smbclient work-in-progress

26 years agodefault server_name if NIS server is unavailable should be the local
Luke Leighton [Fri, 24 Oct 1997 13:58:21 +0000 (13:58 +0000)]
default server_name if NIS server is unavailable should be the local
machine, not a NULL string.

26 years agonmblib.c :
Luke Leighton [Fri, 24 Oct 1997 13:51:17 +0000 (13:51 +0000)]
nmblib.c :

adding some debug info

pipenetlog.c pipentlsa.c pipesrvsvc.c :

using unistrn2 instead of unistr2 in the SAM logon username.
wrong offset for command in request (use "reserved" field
not cancel_count.  AGH i'll get there)

26 years agonterr.c :
Luke Leighton [Fri, 24 Oct 1997 13:15:34 +0000 (13:15 +0000)]
nterr.c :

added a structure that wraps nt errors as strings and enums, so we
can do a smb_nt_error() function.

Makefile ntclient.c :

added ntclient.c, broken out nt domain stuff into a separate file.
getting fed up of compile-times and size of client.c.

fixed the do_lsa_req_chal() function.  made it read the response,
and return the challenge credentials received from the server.

next stop: do_lsa_auth_2().

client.c :

removed nt domain logon functions into a separate file.

pipenetlog.c pipentlsa.c pipesrvsvc.c smbparse.c :

i'd broken the offsets of the RPC_HDR while trying to sort out the
nt client code.  fixed it again.  added some robustness stuff.

util.c :

the unistrn2() function was null-terminating the string at one
character too many.

26 years agoBig change to make nmbd code more readable/understandable.
Jeremy Allison [Thu, 23 Oct 1997 22:30:57 +0000 (22:30 +0000)]
Big change to make nmbd code more readable/understandable.

Main change is removal of find_name_search() confusion.
This has been replaced with find_name_on_subnet() which
makes it explicit what is being searched.

Also changed wins_subnet to be wins_client_subnet in
preparation for splitting the wins subnet into client
and server pieces.

This is a big nmbd change and I'd appreciate any
bug reports.

Specific changes follow :

asyncdns.c:
     Removed wins entry from add_netbios_entry(). This is now
     explicit in the subnet_record parameter.

interface.c:
     iface_bcast(), iface_nmask(), iface_ip() return the
     default interface if none can be found. Made this
     behavior explicit - some code in nmbd incorrectly
     depended upon this (reply_name_status() for instance).

nameannounce.c:
     find_name_search changes to find_name_on_subnet.

namebrowse.c:
     wins_subnet renamed to wins_client_subnet.

namedbname.c:
     find_name_search removed. find_name_on_subnet added.
     add_netbios_entry - wins parameter removed.

namedbsubnet.c:
     find_req_subnet removed - not explicit enough.

nameelect.c:
     wins_subnet renamed to wins_client_subnet.

namepacket.c:
     listening() simplified.

nameresp.c:
     wins_subnet renamed to wins_client_subnet.

nameserv.c:
     find_name_search moved to find_name_on_subnet.

nameserv.h:
     FIND_XXX  -> changed to FIND_SELF_NAME, FIND_ANY_NAME.

nameservreply.c:
     find_name_search moved to find_name_on_subnet.
     Debug entries changed.

nameservresp.c:
     wins_subnet renamed to wins_client_subnet.

namework.c:
     wins_subnet renamed to wins_client_subnet.

nmbd.c:
     wins parameter removed from add_netbios_entry.

nmbsync:
     wins_subnet renamed to wins_client_subnet.

proto.h: The usual.

server.c:
     remove accepted fd from fd_set.

Jeremy (jallison@whistle.com)

26 years agorenamed static cli_setup_pkt() to static cli_setup_packet() because it
Luke Leighton [Thu, 23 Oct 1997 19:27:53 +0000 (19:27 +0000)]
renamed static cli_setup_pkt() to static cli_setup_packet() because it
clashed with the currently-used cli_setup_pkt() in clientutil.c

26 years agocommas in the wrong places...
Luke Leighton [Thu, 23 Oct 1997 19:24:58 +0000 (19:24 +0000)]
commas in the wrong places...

26 years agomissed nmbsync.c when adding setup count and setup pointer arguments to
Luke Leighton [Thu, 23 Oct 1997 17:54:21 +0000 (17:54 +0000)]
missed nmbsync.c when adding setup count and setup pointer arguments to
cli_call_api().  sorting this for jeremy.

there is a discrepancy between the client.c list_servers() and the nmbsync.c
add_info() calls to cli_call_api() - one has an mdrcount of 1024, the other
of zero.

i don't know what difference this makes.

26 years agogeneral sorting out, from crashes generated by do_lsa_req_chal() in client.c
Luke Leighton [Thu, 23 Oct 1997 16:17:07 +0000 (16:17 +0000)]
general sorting out, from crashes generated by do_lsa_req_chal() in client.c

trying to set up the data parameters etc and not understanding what's going on.

in api_netlogTNP, added smb_io_rpc_hdr() call to decode the header received
(and in this instance, generated by do_lsa_req_chal()).  and then noticed
that it's two bytes out.  but i don't know how to do "byte parameters"
and it's not the same format as the LSA_REQCHAL received from nt workstations.

agh!

26 years agomissed one of the files (lsarpc) in the touch and chmod instructions.
Luke Leighton [Thu, 23 Oct 1997 14:36:10 +0000 (14:36 +0000)]
missed one of the files (lsarpc) in the touch and chmod instructions.

26 years agoplaying about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)
Luke Leighton [Thu, 23 Oct 1997 13:38:46 +0000 (13:38 +0000)]
playing about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)
and then send a LSA_REQ_CHAL down it.

26 years agoclient.c :
Luke Leighton [Wed, 22 Oct 1997 18:37:43 +0000 (18:37 +0000)]
client.c :

send to \PIPE\ not \PIPE\NETLOGON.

ipc.c :

fstring name not being bzero'd caused problems when calling named_pipe().

26 years agoMakefile client.c :
Luke Leighton [Wed, 22 Oct 1997 17:51:02 +0000 (17:51 +0000)]
Makefile client.c :

adding start of undocumented options to do NT domain logons, client-side.
starting with LSA_REQCHAL.

the code here happily crashes smbd: i'll investigate this further... :-)

smbparse.c pipeutil.c lsaparse.c :

moved some of the common make_xxxx() functions out of pipeutil.c
so that the make_xxxx and (smb/lsa)_io_xxxx functions now sit
together.  makes sense, really...

added a make_q_req_chal() function.

restructured make_rpc_reply() and called it make_rpc_hdr().  created
functions create_rpc_reply() and create_rpc_response().

pipenetlog.c pipentlsa.c pipesrvsvc.c

calling new create_rpc_reply() function instead of old make_rpc_reply().

proto.h :

usual.

smb.h:

added enum for RPC_PACKET_TYPE

26 years agoMakefile client.c clientutil.c clitar.c nmbsync.c :
Luke Leighton [Wed, 22 Oct 1997 14:28:19 +0000 (14:28 +0000)]
Makefile client.c clientutil.c clitar.c nmbsync.c :

redid the split that i did a year ago, taking the functions in client.c
out into clientutil.c.  guess what?  we could now do encrypted password
NetServerEnum2 calls in nmbd, if we wanted to.

i can now use cli_call_api() to send to different pipes.  i hope.

pipenetlog.c:

allow adding to users group _and_ to admin group.  if adding to
guest group, don't allow adding to users or admin as well.

smb.h :

added some pipe #defines (\PIPE\NETLOGON \PIPE\srvsvc ...)

proto.h :

usual.

26 years agoloadparm.c :
Luke Leighton [Wed, 22 Oct 1997 11:31:37 +0000 (11:31 +0000)]
loadparm.c :

added "domain other sids" parameter

pipenetlog.c :

using "domain other sids" parameter in SAM Logon response.
using new name_to_rid() function for r_uid and r_gid.

pipentlsa.c :

minor mods to do with new name_to_rid() function.

pipesrvsvc.c :

in the "net share enum" response, allocate some more space for the buffer.
there can be only 32 share entries in the response anyway.  this needs
to be dealt with.

pipeutil.c :

modified name_to_rid() function to use new parameters "domain admin users"
and "domain guest users", but will otherwise do unix uid + 1000.

moved make_dom_gids() here.

proto.h:

the usual.

smb.h smbparse.c :

renamed sid_no to sid_rev_num in DOM_SID, and gid to r_gid in DOM_GID.

util.c :

moved make_dom_gids() from here.
created char *unistrn2(uint16* uni_buffer, int max_len)

26 years agoshared memory code cleanups (partly preparing for a possible sysV
Andrew Tridgell [Wed, 22 Oct 1997 11:15:14 +0000 (11:15 +0000)]
shared memory code cleanups (partly preparing for a possible sysV
shared memory implementation)

26 years agoImplemented asynchronous DNS lookups in nmbd.
Andrew Tridgell [Wed, 22 Oct 1997 11:02:00 +0000 (11:02 +0000)]
Implemented asynchronous DNS lookups in nmbd.

I realised this afternoon just how easy it is to add this, so I
thought I'd implement it while the idea was fresh.

nmbd forks at startup and uses a pipe to talk to its child. The child
does the DNS lookups and the file descriptor of the child is added to
the main select loop.

While I was doing this I discovered a bug in nmbd that explains why
the dns proxy option has been so expensive. The DNS cache entries in
the WINS list were never being checked, which means we always did a
DNS lookup even if we have done it before and it is in cache. I'm sure
this used to work (I tested the DNS cache when I added it) so someone
broke it :-(

Anyway, the async DNS gets rid of the problem completely. I'll commit
just the fix to the DNS cache bug to the 1.9.17 tree.

You can disable async DNS by adding -DSYNC_DNS to the compile flags.

26 years agoupdated tel no and email address for my entry.
Luke Leighton [Wed, 22 Oct 1997 10:13:03 +0000 (10:13 +0000)]
updated tel no and email address for my entry.

26 years agodon't send any statistics in the node status reply
Andrew Tridgell [Wed, 22 Oct 1997 03:16:35 +0000 (03:16 +0000)]
don't send any statistics in the node status reply

26 years agopreparing for release of 1.9.18alpha3
Samba Release Account [Tue, 21 Oct 1997 22:56:28 +0000 (22:56 +0000)]
preparing for release of 1.9.18alpha3

26 years agoWHATSNEW.txt: Updated for alpha3.
Jeremy Allison [Tue, 21 Oct 1997 22:51:21 +0000 (22:51 +0000)]
WHATSNEW.txt: Updated for alpha3.
server.c: int16 -> uint16 fix for port comparisons in oplock code.
          Needed for Solaris.
version.h: Updated to alpha3.
Jeremy (jallison@whistle.com)

26 years agoThe ubi_* modules are under LGPL, not standard GPL. This README explains
Christopher R. Hertel [Tue, 21 Oct 1997 21:43:42 +0000 (21:43 +0000)]
The ubi_* modules are under LGPL, not standard GPL.  This README explains
that.

26 years agopreparing for release of 1.9.18alpha2
Samba Release Account [Tue, 21 Oct 1997 21:17:26 +0000 (21:17 +0000)]
preparing for release of 1.9.18alpha2

26 years agoWHATSNEW.txt: Preparing for 1.9.18alpha2 release.
Jeremy Allison [Tue, 21 Oct 1997 19:55:34 +0000 (19:55 +0000)]
WHATSNEW.txt: Preparing for 1.9.18alpha2 release.
smb.conf.5: Added 'bind interfaces only' parameter.
version.h: Updated to 1.9.18alpha2.
Jeremy (jallison@whistle.com)

26 years agochgpasswd.c:
Jeremy Allison [Tue, 21 Oct 1997 18:27:55 +0000 (18:27 +0000)]
chgpasswd.c:
includes.h: SCO changes.
server.c: Added code in open_sockets to allow 'bind interfaces only' to
          work as documented.
Jeremy (jallison@whistle.com)

26 years agoloadparm.c :
Luke Leighton [Tue, 21 Oct 1997 18:25:14 +0000 (18:25 +0000)]
loadparm.c :

added "domain admin users" parameter
added "domain guest users" parameter

these two complement the "domain groups" parameter.  the "domain groups"
parameter should be for your own groups, and well-known aliases.

util.c :

added ability to do "domain groups = power_users admin_users backup_ops"
which are well-known RID aliases, not well-known RID groups.

pipenetlog.c :

combine the "domain admin users"; "domain guest users" and "domain groups"
parameters to give an array of RID groups to include in the SAM Logon
response.

ipc.c smb.h :

moved REALLOC() into smb.h
added RID #defines.

proto.h:

usual.

26 years agodamn, I spelt EACCES wrong.
Andrew Tridgell [Tue, 21 Oct 1997 13:15:20 +0000 (13:15 +0000)]
damn, I spelt EACCES wrong.

actually it's wrong in the linux man page for utime ...

26 years agocheck for EPERM or EACCESS in file_utime()
Andrew Tridgell [Tue, 21 Oct 1997 13:03:46 +0000 (13:03 +0000)]
check for EPERM or EACCESS in file_utime()

26 years agodon't check lp_alternate_permissions() in the new utime workaround
Andrew Tridgell [Tue, 21 Oct 1997 12:55:49 +0000 (12:55 +0000)]
don't check lp_alternate_permissions() in the new utime workaround
code. lp_alternate_permissions() is intended only to affect the
display of file permissions, not what you can actually do with the
files.

26 years agofix the order of become_uid() and become_gid() in become_root(). This
Andrew Tridgell [Tue, 21 Oct 1997 11:54:57 +0000 (11:54 +0000)]
fix the order of become_uid() and become_gid() in become_root(). This
was a harmless bug but left log entries

code cleanup in reply_lanman2()

26 years agoUpdating an entry.Paul
Samba Release Account [Tue, 21 Oct 1997 11:50:14 +0000 (11:50 +0000)]
Updating an entry.Paul

26 years agoadd a note on how to map usernames with spaces in them
Andrew Tridgell [Tue, 21 Oct 1997 10:30:07 +0000 (10:30 +0000)]
add a note on how to map usernames with spaces in them

26 years agoadded a note about which netbios name is use in server level security
Andrew Tridgell [Tue, 21 Oct 1997 09:43:03 +0000 (09:43 +0000)]
added a note about which netbios name is use in server level security

26 years agoprototype updates
Andrew Tridgell [Tue, 21 Oct 1997 09:39:45 +0000 (09:39 +0000)]
prototype updates

26 years agosome cleanups in the clientutil.c code.
Andrew Tridgell [Tue, 21 Oct 1997 09:39:08 +0000 (09:39 +0000)]
some cleanups in the clientutil.c code.

I'm actually hoping to remove this module completely once we convert
nmbd to using the new (much cleaner) clientgen.c

smbclient now also reports if it connects as a guest user

26 years agorewrote the password server code using the new clientgen.c client
Andrew Tridgell [Tue, 21 Oct 1997 09:34:33 +0000 (09:34 +0000)]
rewrote the password server code using the new clientgen.c client
interface

The new code uses a source netbios name equal to the Samba servers
name, not the client name. It also uses NetWkstaUserLogon to do a full
network logon. This means it will honour the servers logon
restrictions (such as login times etc).

26 years agoThis is a set of generic SMB client routines. I needed this in a hurry
Andrew Tridgell [Tue, 21 Oct 1997 09:12:41 +0000 (09:12 +0000)]
This is a set of generic SMB client routines. I needed this in a hurry
to fix the password server code, so I didn't use SMBlib. This code is
fairly generic and uses a "struct cli_state" to hold the client
state.

26 years agoget rid of the KEEP_PASSWORD_SERVER_OPEN define
Andrew Tridgell [Tue, 21 Oct 1997 09:11:19 +0000 (09:11 +0000)]
get rid of the KEEP_PASSWORD_SERVER_OPEN define

26 years agoadd some debug info
Andrew Tridgell [Tue, 21 Oct 1997 09:09:55 +0000 (09:09 +0000)]
add some debug info

26 years agoAdding make_smbcodepage.1 man page.
Jeremy Allison [Mon, 20 Oct 1997 20:34:55 +0000 (20:34 +0000)]
Adding make_smbcodepage.1 man page.
Updated smb.conf with dos filetimes.
Jeremy (jallison@whistle.com)

26 years agoloadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. Added
Jeremy Allison [Mon, 20 Oct 1997 18:52:04 +0000 (18:52 +0000)]
loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. Added
            'dos filetimes' parameter for UTIME fix.
locking_shm.c: Fixed typo (sorry Andrew :-).
namepacket.c: Changed lp_interfaces_only() to lp_bind_interfaces_only().
proto.h: The usual.
reply.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
server.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
system.c: Added Andrew's sanity checks to times in sys_utime().
time.c: Moved set_filetime() to server.c. Made null_mtime() global.
trans2.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
Jeremy (jallison@whistle.com)

26 years agoadded "domain groups" parameter, allowing you to specify the groups that
Luke Leighton [Mon, 20 Oct 1997 16:25:19 +0000 (16:25 +0000)]
added "domain groups" parameter, allowing you to specify the groups that
the user belongs to.

it would be nice to know exactly what the domain groups _are_....

26 years agoadded description of parameters:
Luke Leighton [Mon, 20 Oct 1997 16:24:14 +0000 (16:24 +0000)]
added description of parameters:

domain sid
domain groups
logon drive
logon path

26 years agoadded copyright to headers.
Luke Leighton [Mon, 20 Oct 1997 14:46:05 +0000 (14:46 +0000)]
added copyright to headers.

26 years agoNTDOMAIN.txt:
Luke Leighton [Mon, 20 Oct 1997 14:43:00 +0000 (14:43 +0000)]
NTDOMAIN.txt:

describes how to set up samba as an NT PDC.  it includes debugging
assisting info.  it is expected that this document turn into a
user's document, rather than a debugger's document.

cifsntdomain.txt :

this is the "NT Domain Authentication (draft)" white paper, current
version.  if anyone think it's a bad idea to put a copy of this in
here, i'm quite happy to remove it.

26 years agoAdded DNS Proxy, Printing, [netlogon] share modes = no.
John Terpstra [Mon, 20 Oct 1997 13:18:16 +0000 (13:18 +0000)]
Added DNS Proxy, Printing, [netlogon] share modes = no.

26 years agoupdated briefly to mention NT domain support as working, but experimental.
Luke Leighton [Mon, 20 Oct 1997 13:00:55 +0000 (13:00 +0000)]
updated briefly to mention NT domain support as working, but experimental.

26 years agoremoved home_share from user_info structure.
Luke Leighton [Mon, 20 Oct 1997 12:13:04 +0000 (12:13 +0000)]
removed home_share from user_info structure.

26 years agoutil.c password.c :
Luke Leighton [Mon, 20 Oct 1997 12:10:58 +0000 (12:10 +0000)]
util.c password.c :

added automount_server() function which, if -DAUTOMOUNT is in use,
returns the server name of the NIS auto.map entry.  otherwise,
it returns local_server.

added use of automount_server() for a new substitution %N for NIS
home server.  this defaults, via automount_server(), to the same
functionality as %L if -DAUTOMOUNT is not used.

removed vuser->home_share.  moved code that grabbed the servername
into the separate function automount_server().

loadparm.c :

created "logon drive" (default of "")
created "logon home"  (default of "\\%N\%U")
changed default of "logon path" from NULL to "\\%N\%U\profile".

ipc.c pipenetlog.c :

use lp_logon_drive(), lp_logon_home() and lp_logon_path() in their
now easier-to-use form (don't have to check if *lp_logon_path() and
manually substitute a default of \\%L\%U and do a standard_sub_basic()
on the result, because the default automatically does this.

26 years agoFixed Upper/Lower case typos.
John Terpstra [Mon, 20 Oct 1997 10:30:15 +0000 (10:30 +0000)]
Fixed Upper/Lower case typos.

26 years agoa major share modes reorganisation.
Andrew Tridgell [Mon, 20 Oct 1997 08:46:00 +0000 (08:46 +0000)]
a major share modes reorganisation.

The shares modes code is now split into separate files. The shared
memory implementation is in locking_shm.c. The slow implementation is
in locking_slow.c

It is all controlled by a struct share_ops structure that has function
pointers to the implementation of all the functions needed by a share
modes implementation. An initialisation function sets up this
structure. This will make adding new implementations easy and clean.

This also allowed me to get rid of the ugly code in smbstatus. Now
status.c links to the locking code and calls methods in share_ops.

I also renamed some things and generally organised things in a much
cleaner fashion. Defines and structures specific to each
implementation have been moved to the appropriate file and out of
smb.h.

26 years agocasting cleanups
Andrew Tridgell [Mon, 20 Oct 1997 02:50:12 +0000 (02:50 +0000)]
casting cleanups

26 years agoI am removing these from the source code in preparation for an
Andrew Tridgell [Mon, 20 Oct 1997 01:10:45 +0000 (01:10 +0000)]
I am removing these from the source code in preparation for an
upcoming 1.9.18alpha release. We can't release with this code in there
as it currently stands as it might breach ITAR export restrictions in
the US.

I've discussed ways around this with Jeremy and we can put the code
back in with appropriate modifications once it is needed.

Note that this code isn't actually used in Samba yet, so removing it
has no effect.

If anyone wants the code then look in ~samba-bugs/arcfour/ or grab it
from the CVS attic.

26 years agomove calls to smbhash() inside smbdes.c (for legal reasons)
Andrew Tridgell [Mon, 20 Oct 1997 01:00:08 +0000 (01:00 +0000)]
move calls to smbhash() inside smbdes.c (for legal reasons)

26 years agoupdate the timestamp on config files in our linked list when we notice
Andrew Tridgell [Sun, 19 Oct 1997 23:22:03 +0000 (23:22 +0000)]
update the timestamp on config files in our linked list when we notice
they have changed, otherwise we keep reading them again and again

26 years agodebugging the srvsvc Net Share Enum. some padding issues; some string length
Luke Leighton [Sun, 19 Oct 1997 17:54:13 +0000 (17:54 +0000)]
debugging the srvsvc Net Share Enum.  some padding issues; some string length
issues.  it works!

26 years agocreating NetShareEnum parsing / reply creation. compiles, but untested.
Luke Leighton [Sun, 19 Oct 1997 17:01:06 +0000 (17:01 +0000)]
creating NetShareEnum parsing / reply creation.  compiles, but untested.

26 years agoMakefile :
Luke Leighton [Sun, 19 Oct 1997 15:33:25 +0000 (15:33 +0000)]
Makefile :

added srvparse.o and pipesrvsvc.o

smb.h :

mods to the Net Share Enum stuff

srvparse.c :

Net Share Enum parsing support.  more srvsvc pipe parsing to go here...

pipenetlog.c util.c:

modified standard_sub_basic() so that you can set a global boolean
and use a different string for the %U username substitution.

proto.h:

the usual.

26 years agoadded the following structures:
Luke Leighton [Sun, 19 Oct 1997 14:36:27 +0000 (14:36 +0000)]
added the following structures:

SH_INFO_1
SH_INFO_1_STR
SHARE_INFO_1_CTR
SRV_Q_NET_SHARE_ENUM
SRV_R_NET_SHARE_ENUM

the share info1 container can handle a maximum of 32 shares.  the share info1
string structures contain two unicode strings, with 1024 uint16 characters
_each_.  we're going to _have_ to dynamically allocate the unicode strings,
else we'll run out of stack space.  rapidly.

26 years agoAdded comment submitted by Frank Varnavas.
John Terpstra [Sun, 19 Oct 1997 12:28:00 +0000 (12:28 +0000)]
Added comment submitted by Frank Varnavas.

26 years agopipes.c pipesrvsvc.c :
Luke Leighton [Sun, 19 Oct 1997 12:24:23 +0000 (12:24 +0000)]
pipes.c pipesrvsvc.c :

moved stub srvsvc pipe function into separate file, in preparation for
further work.

26 years agoadd a section on encryption and change the formatting a bit
Andrew Tridgell [Sun, 19 Oct 1997 05:16:54 +0000 (05:16 +0000)]
add a section on encryption and change the formatting a bit

26 years agoput the NT_STATUS_ALLOTTED_SPACE_EXCEEDED error in instead of 0x99.
Luke Leighton [Sat, 18 Oct 1997 15:01:01 +0000 (15:01 +0000)]
put the NT_STATUS_ALLOTTED_SPACE_EXCEEDED error in instead of 0x99.
whatever that means.

26 years agoFixed small typo.
John Terpstra [Sat, 18 Oct 1997 05:28:34 +0000 (05:28 +0000)]
Fixed small typo.

26 years agoAfter talking with Andrew added "interfaces only" parameter that
Jeremy Allison [Sat, 18 Oct 1997 00:22:04 +0000 (00:22 +0000)]
After talking with Andrew added "interfaces only" parameter that
turns off the filtering on the broadcast socket by default.
Jeremy (jallison@whistle.com)

26 years ago.cvsignore: Added make_smbcodepage
Jeremy Allison [Fri, 17 Oct 1997 23:08:07 +0000 (23:08 +0000)]
.cvsignore: Added make_smbcodepage
interface.c: Added is_local_net().
locking.c: Added Fix for zero length share files from Gerald Werner <wernerg@mfldclin.edu>
           plus a race condition fix for the fix.
nameannounce.c: Made function static.
namedbresp.c: extern int ClientDGRAM removed - not used.
namedbserver.c: extern int ClientDGRAM removed - not used.
namedbsubnet.c: Added code to make sockets per subnet.
namepacket.c: Added code to read from all sockets & filter.
nameresp.c: extern int ClientDGRAM removed - not used.
nameserv.c: Indentation tidyup :-).
nameserv.h: Added sockets to struct subnet.
nameservresp.c: Improved debug message.
nmbd.c: Changed to terminte on listen_for_packets exiting.
nmbsync.c: extern int ClientDGRAM & ClientNMB removed - not used.
proto.h: The usual.
util.c: Fixed debug message.
Jeremy (jallison@whistle.com)

26 years agoadd a note about running testparm after modifying smb.conf
Andrew Tridgell [Fri, 17 Oct 1997 22:40:45 +0000 (22:40 +0000)]
add a note about running testparm after modifying smb.conf

26 years agoput the new example config file in here as well
Andrew Tridgell [Fri, 17 Oct 1997 22:34:28 +0000 (22:34 +0000)]
put the new example config file in here as well

26 years agoSimply moved the #include for ubi_dLinkList.h from within dir.c to
Christopher R. Hertel [Fri, 17 Oct 1997 21:06:20 +0000 (21:06 +0000)]
Simply moved the #include for ubi_dLinkList.h from within dir.c to
includes.h.  More consistent with current practice.

26 years agomake_unihdr() was setting the length to 1/2 the required value.
Luke Leighton [Fri, 17 Oct 1997 17:59:38 +0000 (17:59 +0000)]
make_unihdr() was setting the length to 1/2 the required value.

26 years agopipenetlog.c lsaparse.c smb.h :
Luke Leighton [Fri, 17 Oct 1997 16:46:56 +0000 (16:46 +0000)]
pipenetlog.c lsaparse.c smb.h :

SAM logon sorting.  too many buffer pointers.  added in the missing
switch value (value of 3).  dealing with the buffer pointers to the
user info structure in a slightly different way.

26 years agosmbparse.c smb.h :
Luke Leighton [Fri, 17 Oct 1997 13:43:01 +0000 (13:43 +0000)]
smbparse.c smb.h :

uni_max_len and uni_str_len are the other way round, in UNIHDR.

util.c :

increased the show_msg() data size from 256 bytes to 512 bytes:
the LSA SAM Logon response can be about 500 bytes long.

pipenetlog.c :

forgot to set the authoritative field to 1.

26 years agoset the wrong info level (0x0C00 0000 instead of 0xC000 0000) so that
Luke Leighton [Fri, 17 Oct 1997 11:54:30 +0000 (11:54 +0000)]
set the wrong info level (0x0C00 0000 instead of 0xC000 0000) so that
nt got confused and thought that the server password had been set instead
of refused.  this is for the SRV_PWSET response.

26 years agoremove a spurious error message from nmbd. The message was:
Andrew Tridgell [Fri, 17 Oct 1997 03:09:03 +0000 (03:09 +0000)]
remove a spurious error message from nmbd. The message was:

WINS server did not respond to name registration!

this messages should only be produced when we are trying to register
our own names, not when we are the one with the name database and we
are doing a NAME_REGISTER_CHALLENGE on behalf of another host (for
secured wins registration)

26 years agofix the handling of negative name query responses and the handling of
Andrew Tridgell [Fri, 17 Oct 1997 02:56:23 +0000 (02:56 +0000)]
fix the handling of negative name query responses and the handling of
packets with no answer section in general.

The fix has 2 parts:

1) set ans_name to the name we queried if nmb->answers == NULL

2) check for nmb->answers == NULL in several other places where we
currently check for nmb->answers->data

While doing this, I noticed there are lots of places in our nmbd code
where we make assumptions about the packets being well formed. Someone
could easily implement a denial of service attack on nmbd by sending a
packet that causes a null pointer dereference. Does anyone feel like
going through the code and adding checks? Probably the best solution
is to have a single function that "validates" a packet, making sure
that all the required fields are there. This will be a bit tricky as
what fields are required varies a lot between packets. A first pass
would be a function that prints "SUSPECT PACKET" when it hits a packet
that it suspects does not have a required field (or the field is badly
formatted), then we could use this on a live system to find any cases
we've missed.

Any takers?

26 years agodocument -a "append log" option
Andrew Tridgell [Fri, 17 Oct 1997 01:47:10 +0000 (01:47 +0000)]
document -a "append log" option

26 years agoadded -a "append log" option
Andrew Tridgell [Fri, 17 Oct 1997 01:46:16 +0000 (01:46 +0000)]
added -a "append log" option

26 years agosmb.h :
Luke Leighton [Thu, 16 Oct 1997 16:01:25 +0000 (16:01 +0000)]
smb.h :

id_info_1 has a pointer at the front of it.  so does return credentials,
and so does the client credentials.  these are all from the sam logon.
auth_level is 16 bytes not 32 and is actually called a switch_level.

smbparse.c :

smb_io_unihdr() - uni_max_len and uni_str_len are 16 bytes not 32.
this may have a knock-on effect on smb_in_unihdr2() but we'll see...

26 years agodealing with some stack overflow bug somewhere around the use of
Luke Leighton [Thu, 16 Oct 1997 13:38:16 +0000 (13:38 +0000)]
dealing with some stack overflow bug somewhere around the use of
deal_with_credentials() by moving important code to the beginning
of the function :-) :-) :-).

the new seed (old_cred + time + 1) was getting corrupted.

26 years agoinside the auth 2 response bits, i wasn't storing the received client
Luke Leighton [Thu, 16 Oct 1997 12:59:40 +0000 (12:59 +0000)]
inside the auth 2 response bits, i wasn't storing the received client
credentials for the calculation of the next credentials: i was storing
the auth 2 calculated credentials.

oops.

26 years agoadd ERRDOS/67 ERRnosuchshare to the client.c list of error strings
Andrew Tridgell [Thu, 16 Oct 1997 08:01:00 +0000 (08:01 +0000)]
add ERRDOS/67 ERRnosuchshare to the client.c list of error strings

26 years agoAdded Michael Johnsons' PAM modifications <johnsonm@redhat.com>
John Terpstra [Thu, 16 Oct 1997 05:33:24 +0000 (05:33 +0000)]
Added Michael Johnsons' PAM modifications <johnsonm@redhat.com>
This patch has been checked over. JHT

26 years agofixed the problem that browsing breaks if you put quote marks around
Andrew Tridgell [Thu, 16 Oct 1997 03:53:07 +0000 (03:53 +0000)]
fixed the problem that browsing breaks if you put quote marks around
the server string option.

I fixed it by adding: trim_string(ret, "\"", "\"") to lp_string()
which means that it removes leading and trailing quotes from _all_
strings in smb.conf. I think this is what we want as I can't actually
think of any case where quoted strings are needed.

I suspect that this fix will actually fix browsing at quite a few
sites. It's not uncommon to see people putting "" marks around the
workgroup name or other essential strings.

The real reason it was causing browsing to fail is that the browse.dat
file uses " to delimit fields, which means that it wasn't being parsed
correctly. It would be nice to use a proper database format in
browse.dat sometime. In fact, we really need a generic database type
subsystem in Samba to replace the mish-mash we currrently use
(browse.dat, wins.dat, smbpasswd etc)

26 years agoMoved the LGPL from the ubiqx directory into the samba root directory
Christopher R. Hertel [Thu, 16 Oct 1997 01:13:09 +0000 (01:13 +0000)]
Moved the LGPL from the ubiqx directory into the samba root directory
and renamed it COPYING.LGPL.  This is because the ubi_* files are under
LGPL, not regular GPL.
Removed the last few things from the ubiqx directory and deleted it.

26 years agoDon't need it any more.
Christopher R. Hertel [Thu, 16 Oct 1997 01:06:12 +0000 (01:06 +0000)]
Don't need it any more.

26 years agoMade changes to the dir cache functions:
Christopher R. Hertel [Thu, 16 Oct 1997 01:03:18 +0000 (01:03 +0000)]
Made changes to the dir cache functions:
- They now use the ubi_dLinkList linked list code.
  This is not a big gain, I suppose.  It would be significant if there
  were lots of doubly-linked lists in the code and I replaced them all.
  The only other advantage is that the code is more modular, which
  appeals to my own sense of order, if no one elses.  :-}
- I allocate space for the entry structure and the strings in one go,
  instead of using malloc() and separate strdup() calls.  This should
  be more efficient, and allows for a single call to free() to free the
  whole thing.
These are very minor changes, but they do serve to make me more familiar
with the code overall.

26 years agoThis code manages a simple doubly-linked list.
Christopher R. Hertel [Thu, 16 Oct 1997 00:55:11 +0000 (00:55 +0000)]
This code manages a simple doubly-linked list.

26 years agoI got fed up trying to put the tree and list stuff into a subdirectory,
Christopher R. Hertel [Thu, 16 Oct 1997 00:46:21 +0000 (00:46 +0000)]
I got fed up trying to put the tree and list stuff into a subdirectory,
so I've started to move them into the main directory.