samba.git
25 years agonisppass.c: Fixed incorrect parameter usage.
Jeremy Allison [Sat, 27 Jun 1998 00:27:44 +0000 (00:27 +0000)]
nisppass.c: Fixed incorrect parameter usage.
nmbd_become_lmb.c: Add 'force_new_election' parameter to some functions.
                   This allows the start of the election to be done *after*
                   the demotion from local master browser is done.
                   Also changed code so release of 1d name is done
                   immediately to allow other local master to gain it.
nmbd_elections.c: Ensured no elections are run until we have registered
                  the WORKGROUP<1e> name that we must listen on to participate
                  in elections.
nmbd_incomingdgrams.c: Use force_new_election code.
nmbd_namelistdb.c: Make update_name_in_namelist static.
nmbd_subnetdb.c: Fix bug in comparison function. We cannot use memcmp
                   as structure packing may make this fail.
nmbd_packets.c: Ensure that we only send one release packet when
                sending a broadcast packet.
nmbd_workgroupdb.c: Ensure we put the correct value in the ElectionCriterion field.
nmblib.c: Ensure make_nmb_name zero's the struct nmb_name.
Jeremy.
(This used to be commit 1fcb094ba04f01be1261ac92198c25b21b0d5ad5)

25 years agoclitar.c: Fixed gcc warning with comment in /* */ code.
Jeremy Allison [Thu, 25 Jun 1998 23:51:28 +0000 (23:51 +0000)]
clitar.c: Fixed gcc warning with comment in /* */ code.
nmbd_winsserver.c: Remember to free packet in multi-homed register code.
                   Use correct query_name_from_wins_server call instead of
                   query_name call in multihomed code.
Jeremy.
(This used to be commit 6e995802fecb4474003db55a69c9e1663737aade)

25 years agoMinor cosmetic change. I up-cased internal #defines.
Christopher R. Hertel [Thu, 25 Jun 1998 00:22:48 +0000 (00:22 +0000)]
Minor cosmetic change.  I up-cased internal #defines.
(This used to be commit 1ce7d38d9f947d338f2587fa5afbe7536501edfd)

25 years agoThe function add_name_to_subnet(), in file nmbd_namelistdb.c, returns a
Christopher R. Hertel [Tue, 23 Jun 1998 08:15:05 +0000 (08:15 +0000)]
The function add_name_to_subnet(), in file nmbd_namelistdb.c, returns a
pointer to the newly constructed name list entry.  In most cases, this
return value is ignored.  The two exceptions are in asyncdns.c and
nmbd_winsproxy.c.

Most of the calls which ignored the return value were not cast to void, so
I added the cast.  This helped me sort out which calls really did use the
return value.  I also discovered one case, in nmbd_winsserver.c, in which
the return value was being stored to a variable which, in turn, was not
used.

Chris -)-----
(This used to be commit 384122d165ed6d5d211a29e5a63a63bf5cd82c75)

25 years agoArrrgh, one more fix. Restores of long file names were
Richard Sharpe [Mon, 22 Jun 1998 06:31:39 +0000 (06:31 +0000)]
Arrrgh, one more fix. Restores of long file names were
broken ...

Added a bzero of the buffer the names went into ...

Seems OK now ...

Richard Sharpe
(This used to be commit c749c8d0460feddafaa68654d8a4bec33f97cc8c)

25 years agoRemove the copyright to Canon Information Systems Australia, as we don't
Richard Sharpe [Sun, 21 Jun 1998 12:44:34 +0000 (12:44 +0000)]
Remove the copyright to Canon Information Systems Australia, as we don't
want them to have the copyright.

Added a new DOSERR response code that Win95 returns, unimp, unimplemented.

Added code to ignore errors on setting remote time, as Win 95 does not like
the time being changed on a directory.  Win NT and Samba are OK at this.

This is the next to last clean-ups here. Next is to properly handle restore
times on directories (except for Win95--see above).

Now have Jay's changes in and have fixed a bug reported by Tim Lee.
(This used to be commit dc9436bae4493b71ba92970d6cc49dbb33cd55cd)

25 years agoclitar.c: Fixed minor gcc -pedantic-error compile warnings.
Jeremy Allison [Sat, 20 Jun 1998 10:06:26 +0000 (10:06 +0000)]
clitar.c: Fixed minor gcc -pedantic-error compile warnings.
passdb.c: Fixed stupid bug in read_sid_from_file().
Jeremy.
(This used to be commit e65efe3f78240a4fa1ed7931e96c6fb698d9d8c8)

25 years agoRe-submit changes for CLITAR.
Richard Sharpe [Wed, 17 Jun 1998 01:52:57 +0000 (01:52 +0000)]
Re-submit changes for CLITAR.

Have fixed the location of create_string_s back to clitar.c, and have
added Jay Berkenbilt's changes.

Have used safe_strcpy and safe_strcat everywhere and have tested with
long file names extensively, but have not yet been able to check that
it works OK on Solaris.
(This used to be commit daf239a1881d5be4669759e972fbbf07e8e38893)

25 years agoclientgen: Added USE_SSL for client shutdown.
Jeremy Allison [Tue, 16 Jun 1998 18:25:36 +0000 (18:25 +0000)]
clientgen: Added USE_SSL for client shutdown.
clitar.c: Added 'Samba style' comments before string_create_s().
loadparm.c: Fixed missing comma in SSL code.
util.c: Removed string_create_s(). Currently it's only called from
        clitar.c and having it here as well as a static in clitar
        causes the compile to break (Richard, please decide where
        you want this function).
lib/rpc/parse/parse_net.c: Fix from <anders.blomdell@control.lth.se>
                           to stop coredump on missing parameter.
Jeremy.
(This used to be commit d23b44322570cb9a7aa2b86407bf4f91010a237b)

25 years agoDamn, forgot the proto file again
Richard Sharpe [Tue, 16 Jun 1998 06:53:32 +0000 (06:53 +0000)]
Damn, forgot the proto file again
(This used to be commit c63e679337221bbf15beca57249ff3306ebb0369)

25 years agoCLITAR changes to overcome some reported problems and add Jay's changes
Richard Sharpe [Tue, 16 Jun 1998 06:52:24 +0000 (06:52 +0000)]
CLITAR changes to overcome some reported problems and add Jay's changes
(This used to be commit e1468dac0333eacea0a6f85f968e0a6d85af7f4c)

25 years agoAdded SSL support from Christian Starkjohann <cs@obdev.at>
Jeremy Allison [Tue, 16 Jun 1998 01:35:52 +0000 (01:35 +0000)]
Added SSL support from Christian Starkjohann <cs@obdev.at>
This patch may not yet compile with -DUSE_SSL enabled, further
Makefile changes may be needed. But it was important to get
this code in place before I go off to USENIX.
Jeremy.
(This used to be commit 31e768369fdc61e07c59630c86c62239f3d3f3f7)

25 years agoAdding Christian Starkjohann <cs@obdev.at> SSLeay document.
Jeremy Allison [Tue, 16 Jun 1998 01:33:44 +0000 (01:33 +0000)]
Adding Christian Starkjohann <cs@obdev.at> SSLeay document.
Jeremy.
(This used to be commit 9234df00e73980ed383cc77fcaa0a79d417900e4)

25 years agoclient.c: Made -L do a null-session share unless -U user is specified.
Jeremy Allison [Mon, 15 Jun 1998 22:02:14 +0000 (22:02 +0000)]
client.c: Made -L do a null-session share unless -U user is specified.
clientutil.c: Fixed NT session to add NT password.
groupname.c: Added lookup function.
Jeremy.
(This used to be commit 8216363e83fcdccfade70f983830b56b7e6546a4)

25 years agoMakefile:
Jeremy Allison [Mon, 15 Jun 1998 18:19:54 +0000 (18:19 +0000)]
Makefile:
smbumount.c: Added fixes to compile under Linux.
includes.h: Added SunOS 4.x QSORT_CAST fix.
reply.c: Fixed user name mapping function for security=server, security=domain.
Jeremy.
(This used to be commit 21ca6bfb3ba3927efaf7eeff4325976d41489be2)

25 years agoremove .cvsignore as ignored file. This is used in my build scripts.
Herb Lewis [Mon, 15 Jun 1998 16:58:22 +0000 (16:58 +0000)]
remove .cvsignore as ignored file. This is used in my build scripts.
(This used to be commit fb8b04be25d9b8c80719263acc6c4930686b3671)

25 years agoMakefile: Added ubi_sLinkList.o as the groupname.o file needs it. Added groupname.o
Jeremy Allison [Sat, 13 Jun 1998 03:04:00 +0000 (03:04 +0000)]
Makefile: Added ubi_sLinkList.o as the groupname.o file needs it. Added groupname.o
includes.h: Added ubi_sLinkList.h include.
loadparm.c: Added groupname map parameter.
password.c: Fix HPUX big_crypt.
username.c: New user_in_list() code. Moved groupname map code to groupname.c
lib/rpc/server/srv_util.c: Added lookup_wellknown_sid_from_name().

New groupname map stuff. Note that nothing currently uses this but at
compiles ok.

Jeremy.
(This used to be commit beef636a4d772457816ef068c62ea965d07131f6)

25 years agoGroupname mapping code now lives here.
Jeremy Allison [Sat, 13 Jun 1998 03:00:06 +0000 (03:00 +0000)]
Groupname mapping code now lives here.
Jeremy.
(This used to be commit a70b929ec7b38855b7d09378536620c3f221cbe8)

25 years agoThis is the first, small step toward some tweaks that Jeremy and I have
Christopher R. Hertel [Fri, 12 Jun 1998 03:11:33 +0000 (03:11 +0000)]
This is the first, small step toward some tweaks that Jeremy and I have
been discussing regarding the debug mechanism.  With this, I've added a
macro that allows syntax like:

  if( DEBUGLVL( 3 ) )
    {
    Debug1( "message" );
    Debug2( "message" );
    }

The next step is to incorporate timestamps.

Chris -)-----
(This used to be commit 0b35065d0c5a33a9eebee683ecb08e9aef4c1830)

25 years agoipc.c: map_username is now a BOOL function.
Jeremy Allison [Fri, 12 Jun 1998 03:08:23 +0000 (03:08 +0000)]
ipc.c: map_username is now a BOOL function.
reply.c: map_username is now a BOOL function.
server.c: Added capability to do map_username on service names
          when looking for a home directory. That's what the
          original code would do.
lib/rpc/server/srv_util.c: Changed domain_ to builtin_ for
                           BUILTIN aliases.
username.c: Work in progress on groupname map parameter.
Jeremy
(This used to be commit fa95fae5eed95aff64f0a01825477610a101bbc7)

25 years agoRemoved directory-relative include references. This required that I add
Christopher R. Hertel [Thu, 11 Jun 1998 04:40:14 +0000 (04:40 +0000)]
Removed directory-relative include references.  This required that I add
a -I$(srcdir)ubiqx to CFLAGS in the Makefile.  It might be better to
create a UBIDIR value.  What would people like to see?

Chris -)-----
(This used to be commit 7fb9cf4d57eb6ec8f22bc62a7a38d4d71dfaadc6)

25 years agoRemoved the "../" from the #include statement.
Christopher R. Hertel [Thu, 11 Jun 1998 03:24:08 +0000 (03:24 +0000)]
Removed the "../" from the #include statement.
David Mathod from Cal Tech is working on a new port to VMS and requested
that such relative references be removed.
Chris -)-----
(This used to be commit 978c30791677fa8a48c1c8d34daaae52771b201c)

25 years agoMinor changes as I've now discovered gcc -pedantic-errors. This
Jeremy Allison [Wed, 10 Jun 1998 23:15:42 +0000 (23:15 +0000)]
Minor changes as I've now discovered gcc -pedantic-errors. This
does the signed/unsigned warnings I've been missing.
Jeremy
(This used to be commit 6d94e67624d1f2c08ac2e1c0eea23facd1e618f2)

25 years agoI've replaced the linked list used to manage the subnet namelists with a
Christopher R. Hertel [Wed, 10 Jun 1998 19:51:58 +0000 (19:51 +0000)]
I've replaced the linked list used to manage the subnet namelists with a
splay tree.  For short lists, this will have no noticable effect.  As
lists (eg. the WINS database) grow longer, the speed improvements should
be quite dramatic.  This change is an incremental step toward replacing
the in-memory namelists with a back-end database.

This change is going into the 1.9.19pre-alpha code because...well...it's
pre-alpha.  Please let me know if there are any problems.

(Oh, as a side-effect, the wins.dat will be in sorted order.  :)

Chris -)-----
(This used to be commit 7806c453df02a89f67e7c5c8b91f24aa2274e756)

25 years agoDe-coupled the mapping of a Windows to UNIX username from the Get_Pwnam
Jeremy Allison [Wed, 10 Jun 1998 19:45:13 +0000 (19:45 +0000)]
De-coupled the mapping of a Windows to UNIX username from the Get_Pwnam
username case conversion wrapper. It is now (very) explicit where we are
mapping between an incoming Windows username, and when we are doing a
UNIX password entry lookup, which may change the case of the given
username.
This makes things *much* clearer (IMHO:-) and will ease the adding of
the 'groupname map' parameter, and the addition of the special 'jeremy'
mode for Samba where unix users will not be needed. (We must think of
a better name for it :-).
Jeremy.
(This used to be commit fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de)

25 years agoI was wrong about the length and max_length values in make_unistr2.
Jeremy Allison [Tue, 9 Jun 1998 02:33:56 +0000 (02:33 +0000)]
I was wrong about the length and max_length values in make_unistr2.
Jeremy.
(This used to be commit 1d77728bbba49699a05eb70b685a4a97d7598122)

25 years agoloadparm.c: Removed 'domain other sids' parameter.
Jeremy Allison [Tue, 9 Jun 1998 02:26:26 +0000 (02:26 +0000)]
loadparm.c: Removed 'domain other sids' parameter.
lib/rpc/include/rpc_lsa.h: Changed #defines for RPC calls - moved some, made LSA_LOOKUPNAMES correct.
lib/rpc/include/rpc_misc.h: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx.
                            Changed bitmasks for uid to rid to be 1 bit.
lib/rpc/parse/parse_misc.c: Changed make_unistr2 to put length as given, max length as one more.
lib/rpc/server/srv_netlog.c: Removed 'domain other sids' parameter.
lib/rpc/server/srv_samr.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx.
lib/rpc/server/srv_util.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx.
Jeremy.
(This used to be commit 34c91840a3d8c252715dc2f749b7a3b171a5b74f)

25 years agoFixed compile problem after make proto.
Jeremy Allison [Tue, 9 Jun 1998 02:17:06 +0000 (02:17 +0000)]
Fixed compile problem after make proto.
Chris's reformating of the (rather long named function) find_name_for_remote_broadcast_subnet
(moving the function name onto a line on it's own) caused the proto
awk script to miss it.
Jeremy.
(This used to be commit 17c758687f0ec6040633bc1815a52627b7e15f02)

25 years agoThis is a first step toward moving long namelists into a database. I
Christopher R. Hertel [Tue, 9 Jun 1998 01:56:18 +0000 (01:56 +0000)]
This is a first step toward moving long namelists into a database.  I
split the name_record structure into pieces.  The goal is that the key
(the name) be separate from the data associated with the key.  Databases
such as gdbm store information in [key,content] pairs.

There is no functional change in with this update.  It's just a step in
the direction that Jeremy and I have been discussing.

Chris -)-----
(This used to be commit e420a4bd7d368a0e910893400fb7b46ab8694a08)

25 years agoMoved the ubiqx stuff above nameserv.h so that ubiqx typedefs could be
Christopher R. Hertel [Mon, 8 Jun 1998 20:07:40 +0000 (20:07 +0000)]
Moved the ubiqx stuff above nameserv.h so that ubiqx typedefs could be
seen by the nameserve.h header.
(This used to be commit 530b54b8a2234a72d7a12606bff38648e56c5c1c)

25 years agoproto.h
Christopher R. Hertel [Mon, 8 Jun 1998 19:38:57 +0000 (19:38 +0000)]
proto.h
  *Not* the usual.  I did make proto to add the #ifndef..#endif block.
  Just to be safe, I did a cvs diff and found no prototype changes.

ubiqx/sys_includes.h
  More fudging.  I want to use binary tree typdefs in nameserv.h, but
  nameserv.h is included in includes.h which is included by all of the
  ubiqx modules.  The result is that the types are referenced before
  they are declared.  My solution is to prevent nameserv.h and proto.h
  from being included in the ubiqx modules (where they are not needed
  anyway).

Chris -)-----
(This used to be commit f128fda8e6abdbd9ae661dd17684580969ef5068)

25 years agoAdded code to add the Samba names onto the remote_broadcast subnet,
Jeremy Allison [Mon, 8 Jun 1998 19:09:47 +0000 (19:09 +0000)]
Added code to add the Samba names onto the remote_broadcast subnet,
as NT 4.x does directed broadcast node status requests for the *<0x0> name.
Jeremy.
(This used to be commit 8c6fe8870a72271a6acd1633efc362c59e283e19)

25 years agoAdded code to generate
Christopher R. Hertel [Mon, 8 Jun 1998 14:59:30 +0000 (14:59 +0000)]
Added code to generate

#ifndef _PROTO_H_
#define _PROTO_H_
:
:
#endif /* _PROTO_H_ */

in the appropriate places.  This required that I add an END rule.
I generated a new proto.h and diff'ed it against the previous.  There were
no differences except for the added lines.

Chris -)-----
(This used to be commit 6d4d0dc7e65f946f09d127969ccbb4b51dfd6a4e)

25 years agoCosmetic. Added a cast to (void) to a call to add_name_to_subnet() since
Christopher R. Hertel [Mon, 8 Jun 1998 03:44:13 +0000 (03:44 +0000)]
Cosmetic.  Added a cast to (void) to a call to add_name_to_subnet() since
the return value was being ignored anyway.  SGI's lint said:

function returns value which is sometimes ignored
    add_name_to_subnet

Chris -)-----
(This used to be commit ae706bff10cc77f06b8069e637ec9768d6a46966)

25 years agoloadparm.c: Did it ! Changed defaults for 'case preserve' and 'short case preserve'.
Jeremy Allison [Fri, 5 Jun 1998 20:46:05 +0000 (20:46 +0000)]
loadparm.c: Did it ! Changed defaults for 'case preserve' and 'short case preserve'.
            Also removed 'domain allow/deny' parameters.
shmem_sysv.c: Added strerror code so I can see why sysV calls are failing.
lib/rpc/server/srv_netlog.c: Removed code that used 'domain allow/deny' parameters -
                             replaced with a comment so I will remember to fix this later.
Jeremy.
(This used to be commit 5f46c7c4b11a75f1ffbd806cde915b4bf28232db)

25 years agoclient.c: Allowed client to proceed even if it gets error 234 (more data
Jeremy Allison [Thu, 4 Jun 1998 18:49:13 +0000 (18:49 +0000)]
client.c: Allowed client to proceed even if it gets error 234 (more data
          available) when scanning server/workgroup/share lists.
ipc.c: Removed redundent definition of ERROR_MORE_DATA (234) we already have
       ERRmoredata in smb.h
Jeremy.
(This used to be commit ae3510e9fb309be343e245d8460c1ceb8164077b)

25 years agohad what would be a compile error if it wasn't #if 0'd out in passdb_ops
Luke Leighton [Thu, 4 Jun 1998 17:48:21 +0000 (17:48 +0000)]
had what would be a compile error if it wasn't #if 0'd out in passdb_ops
(This used to be commit 2cb94eec59bdcc1272063637bbc8b7a5449fdc62)

25 years agoadded "domain admin group" and "domain guest group" parameters. this is
Luke Leighton [Thu, 4 Jun 1998 15:24:20 +0000 (15:24 +0000)]
added "domain admin group" and "domain guest group" parameters.  this is
because "domain admin users" and "domain guest users" was overloaded.

incorrectly.
(This used to be commit 04b824007263ac4879c7282a2d230deaac7d2c7b)

25 years agoFixed file descriptor leak in open_socket_out - this could
Jeremy Allison [Thu, 4 Jun 1998 01:50:28 +0000 (01:50 +0000)]
Fixed file descriptor leak in open_socket_out - this could
cause nmbd to run out of fd's. Test case found by Eloy Paris.
Jeremy.
(This used to be commit 9e2570317138cc6a7ffdc603564f863ff20139b8)

25 years agoincludes.h: Fixes for NetBSD and BSDI.
Jeremy Allison [Thu, 4 Jun 1998 00:49:32 +0000 (00:49 +0000)]
includes.h: Fixes for NetBSD and BSDI.
smbpass.c: Fixed irix warnings.
Jeremy.
(This used to be commit 2caefb35ff56dba67968d04755d74238a38ba29d)

25 years agoIt occurred to me that the samba includes.h file should be included in the
Christopher R. Hertel [Wed, 3 Jun 1998 21:38:51 +0000 (21:38 +0000)]
It occurred to me that the samba includes.h file should be included in the
header files used by the ubiqx modules, instead of being hidden in the .c
files.  This would ensure that anything in includes.h would be "seen" by
the ubiqx headers.  I also had to put an #ifdef around the includes for
ubi_SplayTree.h and ubi_Cache.h in includes.h to prevent the header of the
descendant type from being included before its parent type.

Chris -)-----
(This used to be commit e30a7e023b7491c01e052ae3dbd1788f84075413)

25 years agoipc.c: Fix bug where we don't return the correct error code when client
Jeremy Allison [Wed, 3 Jun 1998 01:04:45 +0000 (01:04 +0000)]
ipc.c: Fix bug where we don't return the correct error code when client
       gives a too-small buffer for share info. Fix from Gil Kloepfer <gil@arlut.utexas.edu>
smb.h:
server.c: Fix for a nastly little security problem with multi-user Windows NT
          servers and Samba where the contents of the open-file cache can end
          up being served out to users who shouldn't have access. This is some
          *seriously* ugly code.
Jeremy.
(This used to be commit 05c85df3c7da982085615e5a1db6c71e164db4f5)

25 years agoChanged the mechanism for including the Samba includes.h in the ubiqx code
Christopher R. Hertel [Tue, 2 Jun 1998 03:27:16 +0000 (03:27 +0000)]
Changed the mechanism for including the Samba includes.h in the ubiqx code
to something less hurried, simpler, and (I believe) more acceptable to
all.  The ubi_*.c files all now #include sys_include.h which, for Samba,
contains only comments and the line

#include "../includes.h"

That will make sure that the Samba header is there, allows me to
distribute a different default header with the main ubiqx set, and allows
others to write their own sys_includes.h for their own purposes.

Thanks to Andrew and Jeremy for hammering this out with me.

Chris -)-----
(This used to be commit def161eeea4b430d785ec57150f96fae98a34bcb)

25 years agoclientutil.c: Don't core dump if no controlling terminal available for password.
Jeremy Allison [Mon, 1 Jun 1998 18:50:27 +0000 (18:50 +0000)]
clientutil.c: Don't core dump if no controlling terminal available for password.
passdb.c:
lib/rpc/include/rpc_misc.h: First cut at automatic uid/gid to rid mapping.
We can change this at a later date to make more bits available if neccessary.
Jeremy.
(This used to be commit 34f40474aba97118e1e80fe6259c686e46dc16b4)

25 years agopoint people at the main web site for a up to date list of mirrors
Andrew Tridgell [Mon, 1 Jun 1998 06:28:12 +0000 (06:28 +0000)]
point people at the main web site for a up to date list of mirrors
(This used to be commit 553100a2baccc67f1c0e4a1df5b7dc0df9a79c9b)

25 years agoThis change ensures that only the processes/locked files that
Paul Blackman [Sat, 30 May 1998 02:25:11 +0000 (02:25 +0000)]
This change ensures that only the processes/locked files that
belong to -uUsername are printed when running 'smbstatus -uUsername'
PaulB
(This used to be commit da08e486871992043c2650e6aac304cd29ba693c)

25 years agoAdded Paul Eggerts LocalTime patch.
Jeremy Allison [Fri, 29 May 1998 19:18:43 +0000 (19:18 +0000)]
Added Paul Eggerts LocalTime patch.
Jeremy.
(This used to be commit 6721c28ea6bdb5210836352bb5ffc43d787907fa)

25 years agoAdding Greek and Icelandic codepages from :
Jeremy Allison [Fri, 29 May 1998 18:25:43 +0000 (18:25 +0000)]
Adding Greek and Icelandic codepages from :

Manousaridis Haris <genesis@the.forthnet.gr>
and Magnús Gíslason <magnus@hi.is>

respectively.

Jeremy.
(This used to be commit 583aeaf350ede4ea3e28124b8d66ab0d335656d9)

25 years agolatest messing about: probably doesn't compile; doesn't matter.
Luke Leighton [Thu, 28 May 1998 16:55:12 +0000 (16:55 +0000)]
latest messing about: probably doesn't compile; doesn't matter.
(This used to be commit d455d194b7110d4bcbef58134d035bd55702b6f8)

25 years agoOoops - fixed Win95 crash bugs with earlier code.
Jeremy Allison [Wed, 27 May 1998 23:50:30 +0000 (23:50 +0000)]
Ooops - fixed Win95 crash bugs with earlier code.
Jeremy
(This used to be commit 6baeb4ad96bc58cf1bd53f6621067af8344c9556)

25 years agoNewly re-written do_match and mask_match functions, with the
Jeremy Allison [Wed, 27 May 1998 22:48:22 +0000 (22:48 +0000)]
Newly re-written do_match and mask_match functions, with the
help of Ums Harald <Harald.Ums@pro-sieben.de>, who has been
testing our 8.3 wildcards with a test suite.
With his new code for 8.3 matching, this is the test done
(I'm quoting from his email)

"I tested it by generating a directory with about 7600 Files and run
automatc tests with about 4000 patterns. The result from Win95 -> WinNT
and Win95 -> Samba where identical according to diff."

I have also re-written the long filename wildcard code,
so that doing DIR a*z now matches files :

AAA.BBB.CCCC....ZZZZ

correctly, and other fixes besides.

I sincerely hope I can lay this (horrid) issue to rest
now :-).

Jeremy.
(This used to be commit 94e3f0d9b48c1ac6d9235eb6600aff1c47e024bc)

25 years agoremoved "domain sid = " parameter instructions
Luke Leighton [Wed, 27 May 1998 14:22:52 +0000 (14:22 +0000)]
removed "domain sid = " parameter instructions
(This used to be commit 3bc0d700d1f2a63a8037370986b1f6111a38894c)

25 years agoloadparm.c: Added machine password timeout parameter - set to 7 days be default.
Jeremy Allison [Wed, 27 May 1998 00:30:52 +0000 (00:30 +0000)]
loadparm.c: Added machine password timeout parameter - set to 7 days be default.
password.c: Added code to tell server.c when machine password needs changing.
server.c: Change machine password in idle cycles if it needs it.
smbpassfile.c: Fixed up length calculations for machine password file.
smbpasswd.c: Moved domain joining code/machine password changing code.
lib/rpc/client/cli_netlogon.c: And this is where it now lives.
Jeremy.
(This used to be commit b8fedca6191de96159df0d1d17082d82e8e44773)

25 years agosmb.h: More NT SMB stuff (just defines).
Jeremy Allison [Tue, 26 May 1998 19:37:31 +0000 (19:37 +0000)]
smb.h: More NT SMB stuff (just defines).
smbpass.c: Do *NOT* make this function static. It breaks the compile on gcc
util.c: Getting closer to MS wildcard semantics. A trailing '*' matches
        any trailing dot-separated components.
trans2.c: Removed hacks that change multiple '?' -> '*' as this
          breaks things now.
trans2.h: Removed NT_FILE_ATTRIBUTE_NORMAL - now FILE_ATTRIBUTE_NORMAL is defined
          in smb.h.
Jeremy.
(This used to be commit 42a65511068cd9006350c80bbed2f346f3f01cb0)

25 years agoadded set logon, logoff, kickoff etc time functions.
Luke Leighton [Mon, 25 May 1998 13:39:08 +0000 (13:39 +0000)]
added set logon, logoff, kickoff etc time functions.
(This used to be commit dab9728a4376cc52d6e53b09b5f42d08712330d6)

25 years agoi wondered why nisppass.c came up with a linker error "pdb_set_last_set_time"
Luke Leighton [Mon, 25 May 1998 13:24:36 +0000 (13:24 +0000)]
i wondered why nisppass.c came up with a linker error "pdb_set_last_set_time"
not found.  this gave me a clue...

#if 0 /* commented out until someone uses them jra */

...

#endif
(This used to be commit d553901b9a21c4917058fc6838aaf73eb9a1c8cc)

25 years agomore warnings, from Tim Winders
Luke Leighton [Sun, 24 May 1998 17:47:49 +0000 (17:47 +0000)]
more warnings, from Tim Winders
(This used to be commit eb157d6da4719b415a1f5202364aa77f2596bc03)

25 years ago- created pdb_sethexpwd(), to be called from all pwd apis that need to
Luke Leighton [Sun, 24 May 1998 13:36:43 +0000 (13:36 +0000)]
- created pdb_sethexpwd(), to be called from all pwd apis that need to
  store passwords in ascii format

- dealt with lots of signed/unsigned char thingies spotted by Tim Winders.
(This used to be commit bd825f1ef15c4bf12aeba945f8bfdc7fd0e14d25)

25 years agoAdded more NT definitions, getting ready for nttrans code.
Jeremy Allison [Sat, 23 May 1998 02:00:21 +0000 (02:00 +0000)]
Added more NT definitions, getting ready for nttrans code.
Jeremy.
(This used to be commit 26c0176e104f7345f16f7fdb1115f32e6b0cfcdb)

25 years agoadd_nisp21pwd_entry() finished but not tested. module now compiles.
Luke Leighton [Fri, 22 May 1998 12:12:16 +0000 (12:12 +0000)]
add_nisp21pwd_entry() finished but not tested.  module now compiles.
(This used to be commit c74d0defcf8e9fca326af190730439f6451f826a)

25 years agodoesn't compile: don't care. checking this in so people can see what's
Luke Leighton [Fri, 22 May 1998 11:28:32 +0000 (11:28 +0000)]
doesn't compile: don't care.  checking this in so people can see what's
going on.
(This used to be commit b7ccea8ee190a228cf479f325a2c8578e2bd90ce)

25 years agoI've put the ubiqx headers back into includes.h, and removed them from
Christopher R. Hertel [Fri, 22 May 1998 07:46:39 +0000 (07:46 +0000)]
I've put the ubiqx headers back into includes.h, and removed them from
dir.c & mangle.c.  This was possible after I checked the tree code to make
sure that the tree code did not reference functions by macro name.  Also,
note that the AVL module has been removed to prevent conflict with the
SplayTree macro defines.

Chris -)-----
(This used to be commit a1f4c8567c3c5264cbfa99867fa894cafab7da81)

25 years agoThese two are not being used, and they would cause conflict under Andrew's
Christopher R. Hertel [Fri, 22 May 1998 06:32:07 +0000 (06:32 +0000)]
These two are not being used, and they would cause conflict under Andrew's
include scheme.  Removing them works around the problem.  If someone
does need them sometime (can't imagine why, since the splay tree is
typically faster), let me know and we can work something else out.

Chris -)-----
(This used to be commit b3c8b14a47e46e501e1684391e3706e143c2adbf)

25 years agoRemoved all ubiqx includes from includes.h. So far, this was only a problem
Christopher R. Hertel [Fri, 22 May 1998 05:16:27 +0000 (05:16 +0000)]
Removed all ubiqx includes from includes.h.  So far, this was only a problem
for dir.h, which I've fixed.  Andrew did not add includes.h to the ubiqx
headers, which is good because it would cause internal conflicts within the
ubiqx tree modules.  It's also bad because the definitions and includes
that are part of includes.h are now in the ubiqx C files, but not in the
header files.  So, if includes.h were to redefine int, for example, the
new definition would be in the ubiqx C files, but not in the headers.

So, until Andrew and I can work something out that we both agree upon,
there are three basic rules:

1) Don't include includes.h in the ubiqx headers.  Problems may arise.
2) The ubiqx headers must follow includes.h in any Samba module that
   uses them.

This can and should all be worked out.  We just have to talk about it.

Chris -)-----
(This used to be commit 2b6be7084df4ddfca3a1ab7b73304007c5f9d0aa)

25 years agoAdded a disclaimer regarding the changes Andrew wants.
Christopher R. Hertel [Fri, 22 May 1998 04:43:04 +0000 (04:43 +0000)]
Added a disclaimer regarding the changes Andrew wants.
(This used to be commit f8d6aab70a02338c923220459eb12d17fa324e79)

25 years agoPut a do_global_tests() function that will be expanded to
Jeremy Allison [Fri, 22 May 1998 01:51:14 +0000 (01:51 +0000)]
Put a do_global_tests() function that will be expanded to
test all the heuristics we know about for validating smb.conf
file.
Jeremy.
(This used to be commit 76dec5b04e9c3b4b727bf9a44d31acf32b4b6b4c)

25 years agoadded:
Andrew Tridgell [Fri, 22 May 1998 00:32:27 +0000 (00:32 +0000)]
added:

#ifdef HAVE_INCLUDES_H
#include "../includes.h"
#endif

we want _all_ code in Samba to include this file to ensure that we can
override definitions, typedefs and includes in one place.
(This used to be commit 556745037ad7efffd8276b28fed445b007eba253)

25 years agoFixed 'revalidate' parameter so it's only considered in security=share
Jeremy Allison [Thu, 21 May 1998 23:59:04 +0000 (23:59 +0000)]
Fixed 'revalidate' parameter so it's only considered in security=share
mode.
Jeremy.
(This used to be commit 7727f09ea9055053ed1d3e2af1069ddae245efb4)

25 years agoprinting.c: Fixed overflow by one problem in LPRng.
Jeremy Allison [Thu, 21 May 1998 23:50:16 +0000 (23:50 +0000)]
printing.c: Fixed overflow by one problem in LPRng.
reply.c: Fixed password length modifiers to always be done
         is none-encrypted mode used. This fixes Samba for
         people who are using non-encrypted passwords with
         security=server.
Jeremy.
(This used to be commit 720b565349e3467bd81d6d863b9ac54237edd3cf)

25 years agoAlong the lines that Andrew suggested, I added a header called ubi_null.h.
Christopher R. Hertel [Thu, 21 May 1998 17:14:20 +0000 (17:14 +0000)]
Along the lines that Andrew suggested, I added a header called ubi_null.h.
This header tries four different locations for a definition of NULL.  If
NULL still hasn't been found, it defaults to ((void *)0).  All of the
includes can be, essentially, overridden by defining NULL on the command
line, as in -DNULL=((void *)0).  I have faith that this will avoid the
problem of NULL being in different places on different systems.  If there
is a system out there that doesn't define NULL in any of the headers I've
included, then let me know *where* it's defined and I'll add another
header.  Chris -)-----
(This used to be commit 05fcc678729999f249b97460a579bdc218028a47)

25 years agofixed signed / unsigned warnings spotted by tim winders. also fixed
Luke Leighton [Thu, 21 May 1998 12:18:52 +0000 (12:18 +0000)]
fixed signed / unsigned warnings spotted by tim winders.  also fixed
unnecessary "address of" warnings.
(This used to be commit ed0afe1e186ce53046e70d8a92103d4f59a2eed2)

25 years agojean-francois calling the right function for the "net t.o.d" dce/rpc support
Luke Leighton [Thu, 21 May 1998 11:54:40 +0000 (11:54 +0000)]
jean-francois calling the right function for the "net t.o.d" dce/rpc support
does gmtime() not LocalTime() now.
(This used to be commit 64559e72f3028917059dbcafd0b3425266f7d567)

25 years agofix slprintf for sunos4 in head branch
Andrew Tridgell [Wed, 20 May 1998 21:29:32 +0000 (21:29 +0000)]
fix slprintf for sunos4 in head branch
(This used to be commit 4aaf8b6a8bc521e738840fe72708add251eaaccb)

25 years agodce/rpc net time command from jean-francois. does not support timezones
Luke Leighton [Wed, 20 May 1998 13:17:26 +0000 (13:17 +0000)]
dce/rpc net time command from jean-francois.  does not support timezones
(This used to be commit 8e11d542eebe076d74ab264e22b87f7aed9bbe8f)

25 years agoFixed incorrect last arg to safe_strcpy in new wildcard code.
Jeremy Allison [Wed, 20 May 1998 04:20:31 +0000 (04:20 +0000)]
Fixed incorrect last arg to safe_strcpy in new wildcard code.
Jeremy.
(This used to be commit 67007d98b9daf5cccf049cb836dbb989516eb0ce)

25 years agoMinor tweak for wcard compatibility paranoia.
Jeremy Allison [Wed, 20 May 1998 02:07:57 +0000 (02:07 +0000)]
Minor tweak for wcard compatibility paranoia.
Jeremy.
(This used to be commit 5d8ef7d0f1ecb358c841f382fc48e6eccbe8e171)

25 years agoFixed Samba's wildcard algorithm to be *exactly* the same
Jeremy Allison [Wed, 20 May 1998 02:01:21 +0000 (02:01 +0000)]
Fixed Samba's wildcard algorithm to be *exactly* the same
as NT.
You do not want to know how this code works :-).
Jeremy
(This used to be commit 7adbd2dfc1eda0e147b7ab4b5ff5e71f173794af)

25 years agoFix to do NT wildcard matching.
Jeremy Allison [Tue, 19 May 1998 22:06:41 +0000 (22:06 +0000)]
Fix to do NT wildcard matching.
Jeremy.
(This used to be commit 170070b9c793805df9f8629e70027f17b949425f)

25 years agopassdb.c: Fixed typo in coment.
Jeremy Allison [Tue, 19 May 1998 20:08:37 +0000 (20:08 +0000)]
passdb.c: Fixed typo in coment.
smb.h: Removed comments no longer valid.
smbpass.c: Stopped dummy function from being prototyped.
util.c: Fix for multibyte char problems with strlower, strupper
and string_replace.
Jeremy.
(This used to be commit cd244b45a5d35fceee2a4034b0c6aabdb58871aa)

25 years agomade mod_smbfilepwd_entry() and getsmbfilepwent() static. they need not
Luke Leighton [Tue, 19 May 1998 19:50:49 +0000 (19:50 +0000)]
made mod_smbfilepwd_entry() and getsmbfilepwent() static.  they need not
be exposed.
(This used to be commit 61ab72b82b24006c69b573400f740ff73e742b32)

25 years agooops - got some of the default (conversion) functions wrong.
Luke Leighton [Tue, 19 May 1998 19:41:22 +0000 (19:41 +0000)]
oops - got some of the default (conversion) functions wrong.
(This used to be commit b836581cda2b58d285245f71f2bc419c6ece4911)

25 years agoremoved "default" system for password database api: all functions must
Luke Leighton [Tue, 19 May 1998 19:17:35 +0000 (19:17 +0000)]
removed "default" system for password database api: all functions must
be supported.  there are some stub routines in passdb.c which can be
copied into a password database api which do conversion.  the module
writer can choose which of these to provide full support for instead
of using the conversion routines.
(This used to be commit d906ac5941fa22f93a38d65906b89a80f971b83c)

25 years agoldap.c :
Luke Leighton [Tue, 19 May 1998 17:48:40 +0000 (17:48 +0000)]
ldap.c :

- added support for some of the new passdb_ops functions.

- removed functions that are supported "indirectly" through passdb.c

nisppass.c :

- modified make_nisname_from_xxx() functions to take a "file" arg.

- turned getnisp21pwuid() into getnisp21pwrid().  getnisp21pwuid()
  functionality is available through "indirect" support in passdb.c

- removed functions that are supported "indirectly" through passdb.c

- added support for some of the new passdb_ops functions.

passdb.c :

- created getsam21pwrid() function to go alongside getsam21pwuid.
  it is not expected that getsam21pwuid ever be used, certainly
  not from the lib/rpc code.

- created getsamdisprid() and getsamdispent().  these are primarily
  for support of SamrQueryDisplayInfo, however given that they
  [struct sam_disp_info] return username, rid and fullname, there may
  be further instances where these functions will be useful.

- added support where either the get/add/mod-smb or get/add/mod-sam21
  functions are optional.  this can be done very easily by checking
  whether the struct passdb_ops table functions are NULL or not.

  documented this capability in the notes at the top of the module.

- where unix uid was referenced, use uid_t.

- where unix gid was referenced, use gid_t.

smb.h :

- added sam_disp_info functions to passdb_ops.

- added getsam21pwrid() function.

smbpass.c :

- added reference to iterate_getsam21pwrid().

lib/rpc/server/srv_samr.c :

- removed group rid code added to get_user_info_21() code: this
  had been added in the wrong place.  the client / server should
  already know whether it wants to do a lookup by user rid or
  by group rid.

  the test of whether the rid is a user or group rid has been left
  in because this may become useful consistency-check code.

- converted back to getsam21pwrid() not
  getsam21pwuid(pdb_user_rid_to_uid()).

  this is because the unix uid to user rid mapping can be non-monotonic
  in some password database systems, and monotonic in others.  imposing
  the restriction by converting immediately from rid to uid at this
  point is inadviseable, and will place this potential restriction on
  _all_ password database systems, not just some which, for whatever
  reason, do not support user rids.

  it should be up to the individual password database writer to
  convert from user rid to unix uid, should that module not support
  rids.

lib/rpc/server/srv_util.c :

- got lookup_user_name() to call getsamdisprid() not getsmbpwuid().
  a bug was introduced (or at least the bug already there was not
  fixed) whereby the nt user rid was converted to a unix uid, and
  then not used.
(This used to be commit 0193dd21c3c44e0611add742c6f92b92474de6b8)

25 years agoFixed signed/unsigned warning.
Jeremy Allison [Tue, 19 May 1998 04:49:56 +0000 (04:49 +0000)]
Fixed signed/unsigned warning.
Jeremy.
(This used to be commit 6b6539cad8962f2913d892abae811afc72432678)

25 years agoForgot to add the initialize_password_db() call to nmbd also.
Jeremy Allison [Tue, 19 May 1998 04:45:40 +0000 (04:45 +0000)]
Forgot to add the initialize_password_db() call to nmbd also.
Jeremy.
(This used to be commit 2f9f0a88e8220575edb43a9945d0b60829efa840)

25 years agoAbstracted all the crappy password interfaces through an indirect
Jeremy Allison [Mon, 18 May 1998 23:57:28 +0000 (23:57 +0000)]
Abstracted all the crappy password interfaces through an indirect
function table, selectable at compile time. This should make the
code that implements all the password functions much cleaner, as
it's now very clear exactly what a particular password database
needs to provide to Samba.
Jeremy.
(This used to be commit 27ca536ad974242524c12f7100e419d9e7f9647f)

25 years agochgpasswd.c: Changed back to getsmb... from getsam...
Jeremy Allison [Mon, 18 May 1998 21:30:57 +0000 (21:30 +0000)]
chgpasswd.c: Changed back to getsmb... from getsam...
ldap.c: Stoped dummy_function being prototyped.
loadparm.c: Fixed slprintf sizes.
nisppass.c: Fixed safe_strcpy sizes.
nmbd_processlogon.c: Changed back to getsmb... from getsam...
nttrans.c: Just a dump of new code.
passdb.c: Moved stuff around a lot - stopped any lookups by rid. This
          needs to be indirected through a function table (soon).
password.c: Changed back to getsmb... from getsam...
reply.c: Changed back to getsmb... from getsam...
slprintf.c: Fixed prototype problems.
smb.h: Fixed prototype problems.
smbpass.c: Changed to getsmbfile....
smbpasswd.c: Changed back to getsmb... from getsam...
lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam...
lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup.
lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam...
Jeremy.
(This used to be commit 7d332b2493d2089d09521250fc9b72d8953307c0)

25 years agolinker errors with -DUSE_NISPLUS_DB - difficult to spot when you're not
Luke Leighton [Mon, 18 May 1998 17:15:21 +0000 (17:15 +0000)]
linker errors with -DUSE_NISPLUS_DB - difficult to spot when you're not
using nis+ on your system, so you get 100 linker errors...
(This used to be commit e325d9a81039152e8c57f7fab6cf948d8e1ec7d3)

25 years agosorting out removal of some smb_passwd functions by calling pdb_smb_to_sam()
Luke Leighton [Mon, 18 May 1998 17:10:57 +0000 (17:10 +0000)]
sorting out removal of some smb_passwd functions by calling pdb_smb_to_sam()
instead, for use by nisppass.c
(This used to be commit 2253ca407267eb161cfcd8b53dcc9848d9398f4c)

25 years agoremoved references to some of the smb_passwd routines from ldap and nis+
Luke Leighton [Mon, 18 May 1998 15:50:56 +0000 (15:50 +0000)]
removed references to some of the smb_passwd routines from ldap and nis+
code, use pdb_sam_to_smb(...sam21...) calls instead.  this is a lot simpler.
(This used to be commit d92f4e71c12ce5010f05fa7dd3918a48e7386d1e)

25 years agocreating and using some pdb_init_(sam/smb) routines. putting ldap headers
Luke Leighton [Mon, 18 May 1998 14:55:17 +0000 (14:55 +0000)]
creating and using some pdb_init_(sam/smb) routines.  putting ldap headers
back in (they had been taken out of includes.h because they are only
local to ldap.c.
(This used to be commit 98ab085b93fb25a4d9275c0d54a863fd9fae2548)

25 years agono include headers in ldap.c.
Luke Leighton [Mon, 18 May 1998 14:43:06 +0000 (14:43 +0000)]
no include headers in ldap.c.
passdb.c sam_passwd <-> smb_passwd conversion routines
(This used to be commit 8082239c81dfed5e3cc34a4d0a4e7195398ae627)

25 years agoresolving compilation errors
Luke Leighton [Mon, 18 May 1998 14:17:47 +0000 (14:17 +0000)]
resolving compilation errors
(This used to be commit dea0c06eec44a7c2860f97d8f23584d30e482e0a)

25 years agoreceived update from jean francois for ldap.c: he is doing add / mod
Luke Leighton [Mon, 18 May 1998 14:06:49 +0000 (14:06 +0000)]
received update from jean francois for ldap.c: he is doing add / mod
functions
(This used to be commit 381df1e52bfc97b80422de2703db8cb521dc47e1)

25 years ago- renamed some of the passdb.c functions: they have a prefix pdb_ on them
Luke Leighton [Mon, 18 May 1998 12:27:04 +0000 (12:27 +0000)]
- renamed some of the passdb.c functions: they have a prefix pdb_ on them

- split smbpass.c "password file lock" routines into smbpassfile.c: moved
  trust account routines into smbpassfile.c as well
(This used to be commit 3e48b4eb113cc5e1c6794d7ac699fd9ac47c654a)

25 years agooops. pressed ctrl-z while editing the previous cvs message: this was
Luke Leighton [Mon, 18 May 1998 11:59:19 +0000 (11:59 +0000)]
oops.  pressed ctrl-z while editing the previous cvs message: this was
taken to mean ":x".
(This used to be commit 660206e816f9be708e09a1aad3b342b94e5e4f53)

25 years agoMakefile:
Luke Leighton [Mon, 18 May 1998 11:54:00 +0000 (11:54 +0000)]
Makefile:

- added nisppass.c and NISPLUS_FLAGS

includes.h:

- renamed USE_LDAP to USE_LDAP_DB.  renamed NISPLUS to USE_NISPLUS_DB.
added default define of USE_SMBPASS_DB.

- removed ldap headers: they are local only to ldap.c

ldap.c :

- made all ldap-specific functions static.

- added dummy sam21 functions

loadparm.c :

- renamed NISPLUS to NISPLUS_HOME

mkproto.awk

- commented out ldap-specific #ifdef generation code: it's not
  needed now that ldap-specific functions in ldap.c are static

nisppass.c :

- first attempt at an add function from
(This used to be commit f215d375f0f1e12894c2a9e86bd28d4776d337c1)

25 years agoChange getpwnam to Get_Pwnam(xx , True) to allow lazy matching
Jeremy Allison [Fri, 15 May 1998 23:10:46 +0000 (23:10 +0000)]
Change getpwnam to Get_Pwnam(xx , True) to allow lazy matching
in /etc/passwd. Fix from "Mike Black" <mblack@csihq.com>.
Jeremy.
(This used to be commit 0146883f8568de4642087bb769b0381c3217d792)

25 years agoFix from "Gerald W. Carter" <cartegw@eng.auburn.edu>, we were
Jeremy Allison [Fri, 15 May 1998 22:29:42 +0000 (22:29 +0000)]
Fix from "Gerald W. Carter" <cartegw@eng.auburn.edu>, we were
copying from a parameter into an unitialized variable (doh !).
Jeremy.
(This used to be commit a3a0dc14c2f9f703963ade67f30dd6c40bbe7144)

25 years agosome databases have search capabilities. acknowledging this in design
Luke Leighton [Fri, 15 May 1998 14:50:35 +0000 (14:50 +0000)]
some databases have search capabilities.  acknowledging this in design
of passdb.c api.
(This used to be commit 2dd01b7c70f7e1f3158bd4bc75459892007e5418)