1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

369 Commits

Author SHA1 Message Date
Jeremy Allison
6a019636b9 Fixed nasty bug where file writes with start offsets in the range
0x80000000 -> 0xFFFFFFFF would fail as they were being cast
from IVAL (uint32) to SMB_OFF_T (off_t or off64_t, both *signed* types).
The sign extension would cause the offset to be treated as negative.
Thanks to Herb for helping me track this one down (IRIX is good for large
file tests :-).
Jeremy.
PS. That horrid EXEXIST thing has broken configure.....
(This used to be commit 2d14c442bc)
2002-12-03 08:02:41 +00:00
Jelmer Vernooij
dc5297f413 Sync with HEAD
(This used to be commit 1a25dc776d)
2002-11-09 16:57:45 +00:00
Jelmer Vernooij
1608de77a4 Remove SAM - it belongs in HEAD
(This used to be commit 808dbcf345)
2002-10-29 21:26:33 +00:00
Jelmer Vernooij
2f367b091e Sync with HEAD
(This used to be commit a64affffb2)
2002-10-29 17:31:00 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52)
2002-08-17 17:00:51 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Andrew Tridgell
9cd0306baa This split the mangling code up to allow for the possibility of multiple
mangling implementation, selectable using "mangling method = " in smb.conf

It also tidies the interface a little, although it is still nasty.
(This used to be commit be23d87a17)
2002-04-11 02:20:56 +00:00
Jeremy Allison
0cb0c6e903 Added sys_adminlog() system for info the appliance admins really
need to know about. Different from the DEBUG system.
Jeremy.
(This used to be commit 74eac41c68)
2002-03-27 23:17:50 +00:00
Andrew Bartlett
53d0c9c79f Remove util_list.h, as its matching .c file has already gone, and nobody is
using it anymore.  This also removes an early #include of smb.h, making it
slightly easier to track whats being included where.

Andrew Bartlett
(This used to be commit 9d25e30232)
2002-03-02 05:35:10 +00:00
Andrew Bartlett
75de5a5dfa The beginning of trusted and trusting domain support from
Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl>

This adds the 'net' tools to manipulate the trusted domains.

Andrew Bartlett
(This used to be commit 770c8a31d9)
2002-03-01 02:56:35 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Bartlett
1a74d8d1f0 This is another *BIG* change...
Samba now features a pluggable passdb interface, along the same lines as the
one in use in the auth subsystem.  In this case, only one backend may be active
at a time by the 'normal' interface, and only one backend per passdb_context is
permitted outside that.

This pluggable interface is designed to allow any number of passdb backends to
be compiled in, with the selection at runtime.  The 'passdb backend' paramater
has been created (and documented!) to support this.

As such, configure has been modfied to allow (for example) --with-ldap and the
old smbpasswd to be selected at the same time.

This patch also introduces two new backends:  smbpasswd_nua and tdbsam_nua.
These two backends accept 'non unix accounts', where the user does *not* exist
in /etc/passwd.  These accounts' don't have UIDs in the unix sense, but to
avoid conflicts in the algroitmic mapping of RIDs, they use the values
specified in the 'non unix account range' paramter - in the same way as the
winbind ranges are specifed.

While I was at it, I cleaned up some of the code in pdb_tdb (code copied
directly from smbpasswd and not really considered properly).  Most of this was
to do with % macro expansion on stored data.  It isn't easy to get the macros
into the tdb, and the first password change will 'expand' them.  tdbsam needs
to use a similar system to pdb_ldap in this regard.

This patch only makes minor adjustments to pdb_nisplus and pdb_ldap, becouse I
don't have the test facilities for these.  I plan to incoroprate at least
pdb_ldap into this scheme after consultation with Jerry.

Each (converted) passdb module now no longer has any 'static' variables, and
only exports 1 init function outside its .c file.

The non-unix-account support in this patch has been proven!  It is now possible
to join a win2k machine to a Samba PDC without an account in /etc/passwd!

Other changes:

Minor interface adjustments:
pdb_delete_sam_account() now takes a SAM_ACCOUNT, not a char*.

pdb_update_sam_account() no longer takes the 'override' argument that was being
ignored so often (every other passdb backend).  Extra checks have been added in
some places.

Minor code changes:
smbpasswd no longer attempts to initialise the passdb at startup, this is
now done on first use.

pdbedit has lost some of its 'machine account' logic, as this behaviour is now
controlled by the passdb subsystem directly.

The samr subsystem no longer calls 'local password change', but does the pdb
interactions directly.  This allow the ACB_ flags specifed to be transferred
direct to the backend, without interference.

Doco:

I've updated the doco to reflect some of the changes, and removed some paramters
no longer applicable to HEAD.
(This used to be commit ff354c99c5)
2002-01-20 14:30:58 +00:00
Jeremy Allison
3454945146 Getting ready to add UNIX extensions in HEAD also.
Jeremy
(This used to be commit 6210d4aa19)
2002-01-10 00:28:09 +00:00
Martin Pool
bb21af13e3 Add UNUSED(paramname) macro to be used in parameter lists, to quieten
gcc warnings about unused parameters.
(This used to be commit b29775d442)
2002-01-09 05:27:59 +00:00
Martin Pool
abc6e70ca4 Fix macro name controlling inclusion of DMALLOC.
(This used to be commit a57e13b8b6)
2002-01-09 05:10:47 +00:00
Andrew Tridgell
c0fb3e1396 renamed ans1.h to asn_1.h to prevent conflict caused by krb5 headers
on some platforms using "" instead of <> in include statements
(This used to be commit d0ba307032)
2002-01-01 04:05:10 +00:00
Andrew Tridgell
162a6606bd cope with systems that don't have full gssapi libs
(This used to be commit c4d928e55f)
2001-12-31 14:31:13 +00:00
Andrew Bartlett
34037e2479 Make Samba compile on RH 6.2 again.
We now include the libber.h file if required, but currently we just don't use
ldap.  (I'll chase this up).

In the meantime, I've moved the ads_status code about, its now in its own file,
and has a couple of #ifdefs to allow smbd to link - becouse the lack of LDAP
caused HAVE_ADS to be undefined. (I hope its not too ugly).

Andrew Bartlett
(This used to be commit 14407c87e2)
2001-12-30 05:59:43 +00:00
Martin Pool
cc0846f967 Add --enable-dmalloc to link against the dmalloc malloc debugger.
It's not as strong as Insure, but it's free, reasonably efficient and
works on every platform.
(This used to be commit e76d27fcdb)
2001-12-20 04:01:44 +00:00
Martin Pool
55f6eefe12 Doc.
(This used to be commit 5b6c22a209)
2001-12-19 04:55:58 +00:00
Andrew Tridgell
09b01cdcbd check for gssapi_generic.h
(This used to be commit 838fbac7a0)
2001-12-08 12:06:08 +00:00
Andrew Tridgell
5d378a280f added internal sasl/gssapi code. This means we are no longer dependent on cyrus-sasl which makes the code much less fragile. Also added code to auto-determine the server name or realm
(This used to be commit 435fdf276a)
2001-12-08 11:18:56 +00:00
Andrew Tridgell
a7ac992b12 added test for krb5.h
this was causing the kerberos stuff to fail compilation on several
platforms
(This used to be commit 17e2f38973)
2001-11-27 22:37:25 +00:00
Andrew Tridgell
b1cf8f6cda sigh.
some systems have libkrb5 but not krb5.h
(This used to be commit 4b89fdecfc)
2001-11-27 07:09:06 +00:00
Tim Potter
4e512ab75d Fixed compiler warning.
Why do people keep adding stuff to includes.h (OK I am guilty of this too)?
It's getting really huge and full of random junk.  )-:

I've noticed TNG have started to split stuff up in to individual header
files included as needed.
(This used to be commit 36630f3984)
2001-11-25 23:33:15 +00:00
Andrew Tridgell
0b5f228d30 added HAVE_LDAP_H check
(This used to be commit a1304be045)
2001-11-25 12:40:23 +00:00
Andrew Tridgell
ad2974cd05 added "net join" command
this completes the first stage of the smbd ADS support
(This used to be commit 058a5aee90)
2001-11-24 14:16:41 +00:00
Andrew Tridgell
6464bb0ae5 added the beginnings of ADS support in smbd
(This used to be commit c7f6116919)
2001-11-20 08:54:15 +00:00
Martin Pool
1ba477ae6c Fix obvious typo.
(This used to be commit d761a3860b)
2001-11-19 04:29:24 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Jeremy Allison
186726b7f8 Tidyups and things I discovered during the merge...
Jeremy.
(This used to be commit 9c8439f25b)
2001-11-15 21:06:41 +00:00
Jeremy Allison
db8ff475ac Fix for broken-as-shipped RedHat 7.2 system headers. Now we have
to detect this in configure.
Jeremy.
(This used to be commit 44fb1992c9)
2001-11-04 20:50:30 +00:00
Jim McDonough
be6edf50c4 Add popt for parsing commandline options
(This used to be commit df34e11d84)
2001-10-23 14:16:22 +00:00
Jim McDonough
b24ceaa837 Add rap.h for net utility and libsmb
(This used to be commit 3545de4773)
2001-10-19 16:46:34 +00:00
Andrew Tridgell
5ad7448359 the beginnings of kerberos support in smbd. It doesn't work yet, but
it should give something for others to hack on and possibly find what
I'm doing wrong.
(This used to be commit 353c290f05)
2001-10-18 10:26:06 +00:00
Andrew Tridgell
a689b24db1 the next step in the intl changeover. This should get us compiling agian,
and also completes the switch to lang_tdb.c. SWAT should now work
with a po file in the lib/ directory

also removed useless SYSLOG defines in many files
(This used to be commit 5296b20ad8)
2001-10-14 12:10:29 +00:00
Andrew Tridgell
81f56139b6 initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to:

- install krb5 libraries
- run configure
- build smbclient
- run kinit to get a TGT
- run smbclient with the -k option to choose kerberos auth
(This used to be commit d330575856)
2001-10-11 07:42:52 +00:00
Jeremy Allison
36a6611da2 Use structure copy to fix unaligned accesses on 64bit architectures on
Linux.
Jeremy.
(This used to be commit b4b891279b)
2001-09-18 06:20:28 +00:00
Andrew Tridgell
b12a4dd9b6 declare dbf in one spot
(This used to be commit f41c3bb80f)
2001-09-10 12:14:18 +00:00
Andrew Tridgell
b30e75692d replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down
replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor
limit that we hit with nasty consequences on some systems

I would eventually prefer us to have a configure test to see if we need
to replace stdio, but for now this code needs to be tested widely so
I'm enabling it by default.
(This used to be commit 1af8bf34f1)
2001-09-10 11:08:57 +00:00
Andrew Tridgell
eb7b28759a fixed missing const on d_printf declaration
(This used to be commit 865e0507e6)
2001-09-09 02:37:10 +00:00
Andrew Tridgell
65c5a1c0ba convert more code to using d_printf
(This used to be commit 60d2973034)
2001-09-08 02:59:23 +00:00
Andrew Tridgell
5573a1c739 added "display charset" option in smb.conf, along with d_printf()
which should now be used instead of DEBUG(0) or printf() for
interactive messages

I have only converted client.c to use d_printf(), and the code hasn't
had much testing yet. Eventually we want all interactive code to use
d_printf(), plus SWAT
(This used to be commit 266d8e6766)
2001-09-07 14:14:57 +00:00
Andrew Tridgell
7deed93dd7 fixed a bunch of compilation errors on Solaris, mostly people getting NSS_STATUS and WINBINDD error codes mixed up
(This used to be commit 66698d6b84)
2001-09-05 07:55:54 +00:00
Tim Potter
d1f53e4044 Fixed detection of CUPS. We need to check for the presence of the cups
header files as well as libcups.
(This used to be commit 2dbb41a7b8)
2001-08-23 19:06:20 +00:00
Andrew Bartlett
2051bb7d03 A few changes:
drop paramaters:
 status
 utmp hostname

change session code to always record each vuid current on the server.  The sessionid struct is no longer packed, as I couldn't get that to work ;-)

change smbstatus to show this info and less of the connections.tdb info (its not actualy that accurate).

I'll get swat doing some of this shortly.
(This used to be commit b068ad3005)
2001-08-22 19:11:55 +00:00
Andrew Bartlett
986372901e This is my 'Authentication Rewrite' version 1.01, mostly as submitted to
samba-technical a few weeks ago.

The idea here is to standardize the checking of user names and passwords,
thereby ensuring that all authtentications pass the same standards.  The
interface currently implemented in as

nt_status = check_password(user_info, server_info)

where user_info contains (mostly) the authentication data, and server_info
contains things like the user-id they got, and their resolved user name.

The current ugliness with the way the structures are created will be killed
the next revision, when they will be created and malloced by creator functions.

This patch also includes the first implementation of NTLMv2 in HEAD, but which
needs some more testing.  We also add a hack to allow plaintext passwords to be
compared with smbpasswd, not the system password database.

Finally, this patch probably reintroduces the PAM accounts bug we had in
2.2.0, I'll fix that once this hits the tree.  (I've just finished testing
it on a wide variety of platforms, so I want to get this patch in).
(This used to be commit b30b6202f3)
2001-08-03 13:09:23 +00:00
Andrew Tridgell
7879d999ab a better test for unix domain sockets
(This used to be commit 7b3d030e1f)
2001-07-25 03:28:45 +00:00
Andrew Tridgell
5f1130746f if EILSEQ doesn't exist then use EIO. It doesn't really matter what
error code we use, as long as its not another one that iconv() can
give.
(This used to be commit 2097abb76c)
2001-07-22 10:50:21 +00:00
Andrew Tridgell
4951426613 changed the iconv interface to go via ucs2 for all conversions. This
fixes some problems wih some character sets and allows for using
internal charsets in conjunction with ionv charsets
this makes us slower but more correct. speed will come later.
(This used to be commit 594f84b4e3)
2001-07-22 07:38:32 +00:00
Andrew Bartlett
7be19ad10f Add backend encryption support for NTLMv2.
The leg-work for this was done by the folks at samba-tng.org, I'm just bringing
it accross to HEAD.

The MD5 implementation is seperatly derived, and does not have the copyright
problems that the one in TNG has.

Also add const to a few places where it makes sence.

Andrew Bartlett
(This used to be commit 8df8e84144)
2001-07-07 07:00:15 +00:00
Andrew Tridgell
5a2b87d810 missed a couple of strchr calls
(This used to be commit 57e7df8ae5)
2001-07-04 07:39:01 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
1b5af57b2f Added #define of int32 to int for cray. This will almost certainly cause
the rpc code to fail on the cray....
Jeremy.
(This used to be commit 33a299a0c4)
2001-07-03 18:33:16 +00:00
Andrew Tridgell
f73122e79d fixed build
don't rush commits :)
(This used to be commit 442bf5cc9e)
2001-06-26 05:38:24 +00:00
Andrew Tridgell
8a0480b137 fall back to "unsigned" for uint32 on systems that don't have one
(This used to be commit 4d0c316709)
2001-06-26 05:21:49 +00:00
Andrew Tridgell
b95a294a08 fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef instead of a define
(This used to be commit e2ecff419f)
2001-06-25 02:53:13 +00:00
Jeremy Allison
809c025878 Added patches to remove Linux specific XFS ACLs. These are now handled by the
generic Linux ACL code.
rpc_server/srv_samr_nt.c: Don't delete a policy handle before it's created.
Jeremy.
(This used to be commit db5b82e53a)
2001-06-18 20:27:35 +00:00
Tim Potter
384a328457 Compile fix for Solaris.
(This used to be commit 7a1929b6ca)
2001-06-04 03:15:41 +00:00
Andrew Tridgell
d8f2016d4a fixed asprintf declaration
(This used to be commit fbf03c89e6)
2001-05-30 13:53:20 +00:00
Andrew Tridgell
05d0841472 - added AC_HAVE_DECL() macro to aclocal.m4, so we can easily add
tests for a fn or variable being defined in headers
- used this to add prototypes for asprintf and vasprintf on systems
  that don't have them
(This used to be commit ab24652394)
2001-05-30 12:28:13 +00:00
Simo Sorce
bbf5ea221a 4 new functions to retrieve single linked list of group and passwd entries
+ a fix to an infinite loop in srv_samr_nt.c caused by misuse of
setgrent/getgrent/endgrent solved by these new functions
(This used to be commit 97dbb54a13)
2001-05-29 07:34:01 +00:00
Tim Potter
ae6e20300c Removed S_ISSOCK() macro as it's only used within winbind client code.
(This used to be commit 8fe76adb33)
2001-05-08 05:53:33 +00:00
Jeremy Allison
548d16869a Fixed SHM_R/SHM_W warnings by moving sys/ipc.h and sys/shm.h into includes.h
and using autoconf tests.
Added "restrict acl with mask" parameter.
Jeremy.
(This used to be commit 7792e32ba7)
2001-05-03 19:47:30 +00:00
Andrew Tridgell
63602d15af - fixed some compiler warnings
- fixed slprintf and vsprintf macros
(This used to be commit c986a3c51e)
2001-04-28 14:01:02 +00:00
Andrew Tridgell
d095b5249c - added test for vasprintf
- cleaned up GNUC printf attribute macros
- added enum handling in mkproto
- removed non-vararg code
- made slprintf and vslprintf just macros for snprintf and vsnprintf
- don't need slprintf code any more
(This used to be commit c7aeb2254d)
2001-04-28 13:49:34 +00:00
Jeremy Allison
0766f84a40 Merge of changes from 2.2.
Jeremy.
(This used to be commit df912162bb)
2001-04-18 04:33:24 +00:00
Jeremy Allison
dcc01ec5fb Fix for broken RelientUNIX.
Jeremy.
(This used to be commit 6808ec0d47)
2001-04-04 17:20:57 +00:00
Jeremy Allison
a6d201a8d7 Added XFS ACLs on Linux. Code from John Trostel <jtrostel@connex.com>.
Jeremy.
(This used to be commit 0865366f6b)
2001-04-03 00:40:01 +00:00
Jean-François Micouleau
0053bd8b80 first pass of the new group mapping code
J.F.
(This used to be commit 7154deb026)
2001-03-23 00:50:31 +00:00
Jeremy Allison
c7a953a318 Added sys_dlopen/sys_dlsym/sys_dlclose.
Jeremy.
(This used to be commit 49f0e7e714)
2001-03-19 07:08:02 +00:00
Andrew Tridgell
bc25293f96 much simpler readline code
should work with readline 2.x
(This used to be commit 7940b6b0cf)
2001-03-18 23:41:53 +00:00
Andrew Tridgell
9c4927d362 much better readline support from Simo Sorce, with some mods from me
to make it a bit simpler
(This used to be commit e1487eb2c4)
2001-03-18 13:24:57 +00:00
Jeremy Allison
7e4c4721b4 Changed to sourceforge tdb code. This includes spinlocks (so we now have
a --with-spinlocks option to configure, this does mean the on-disk tdb
format has changed, so 2.2alphaX sites will need to re-create their
tdb's. The upside is no more tdb fragmentation and a +5% on netbench.
Swings and roundabouts....
Jeremy.
(This used to be commit 9dea7b7c25)
2000-12-06 00:05:15 +00:00
Gerald Carter
01e0d3879e TDB password backend support written by Simo Sorce <simo.sorce@polimi.it>
Marked as an experimental compile time option (defaults to off) for now.





jerry
(This used to be commit 0435af4417)
2000-10-26 03:31:41 +00:00
Jeremy Allison
ba00796e6d Herb's warning fixes. Also the POSIX locking fix.
We now use our own vfs layer to do get/set acl calls (hurrah!).
Jeremy.
(This used to be commit dfe77c7046)
2000-10-06 18:13:52 +00:00
Jeremy Allison
636f146abf Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
(This used to be commit b07611f815)
2000-10-06 03:21:49 +00:00
Andrew Tridgell
3edcc8c407 added a hack to get 64 bit locking working with the broken fcntl()
call in glibc 2.1.95. This hack only gets enabled if you define
GLIBC_HACK_FCNTL64
(This used to be commit d8b9ec741c)
2000-09-29 04:45:00 +00:00
Andrew Tridgell
3689e4ffc1 the first cut of the internal messaging system.
The motivation for this system is to replace the UDP message for
oplocks, but this commit only does the "set debug level" message.
(This used to be commit 2a34ee95f3)
2000-09-11 07:02:43 +00:00
Gerald Carter
a1bd676617 Fixed some more client SPOOLSS functions. The following
functions work now:

  - spoolenum
  - spoolopen
  - spoolgetprinter
  - spoolgetprinterdriver

Items todo:

  - track down memory bug with spoolenumdata
  - fix spoolgetprinterdriverdir
  - fix spoolgetdata
  - fix display_job_info_ctr in spooljobs

All part of the ongoing rpcclient work.

Also included a new generic list ADT.  Cleaner and simplier
than the stuff in util_array.c i think (but then that's why I wrote it).





--jerry
(This used to be commit 381aba2c9a)
2000-07-18 05:16:30 +00:00
Tim Potter
b561c18597 Fixes for various compile warnings on Solaris 8.
(This used to be commit 898a483cda)
2000-07-10 06:41:04 +00:00
Tim Potter
f1ccd14b42 Include nss.h if present or define enough values to allow client access to
winbind.
(This used to be commit 669bd8dc1a)
2000-07-06 06:59:27 +00:00
Tim Potter
d2e691280d Added MAX_SEC_CTX_DEPTH
(This used to be commit 2bf21395ba)
2000-06-23 06:19:26 +00:00
Tim Potter
159aec63ae A neater way of solving the S_ISSOCK, S_ISFIFO problem.
Moved the S_* macros from smb.h to includes.h
(This used to be commit b37539e323)
2000-06-21 06:26:21 +00:00
Andrew Tridgell
f94f053b76 added support for kernel level share modes. These are a (small) hack,
I suspect we will either get rid of them or do them properly at some
stage.
(This used to be commit fabe1f350e)
2000-06-15 09:35:37 +00:00
Andrew Tridgell
0fb1dbe7fa fixed Linux capabilities handling
I used a trick where CAP_LEASE isn't claimed until it is needed. This
means we avoid a system call per setreuid(), and never call capset()
unless a user tries to get a oplock on a file that they don't own
(This used to be commit afa98d511f)
2000-06-11 06:24:54 +00:00
Andrew Tridgell
8843a6379d Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
(This used to be commit b28cc4163b)
2000-06-11 05:57:58 +00:00
Andrew Tridgell
c23e01d049 the beginnings of a new scheme I've working on to allow an easier
head/tng merge.

It goes something like this:

- headers from tng get copied over one at a time

- the old headers get renamed to *_old.h

- server side code that used the old headers gets a
  #define OLD_NTDOMAIN 1
  #undef OLD_NTDOMAIN
  at the start and end of the code

- mkproto.awk recognises these special defines and does magic stuff so
  that each .c file sees the right headers

- we start moving the rpc client libraries from tng to head.

if this goes OK then, in theory, we should be able to move the client
side rpc code from tng to head without disturbing the existing head
server side code. Then when that works we can consider merging the
server side.

it remains to be seen if this scheme will work. So far I've moved
rpc_samr.h and don't seem to have broken anything.

Note this this is still a very delicate operation, as at every step of
the way I want to keep head fully functional. Please don't take part
unless you discuss it with me first.
(This used to be commit f76c037255)
2000-05-09 13:28:19 +00:00
Andrew Tridgell
2958dfcdf8 added secrets.tdb and changed storage of trust account password to use
it
(This used to be commit 88ad00b82a)
2000-05-08 10:42:21 +00:00
Andrew Tridgell
bfb9c3ea86 allow a DEFAULT_PRINTING to be specified in CFLAGS
(This used to be commit 80ebb0ad54)
2000-05-01 05:42:09 +00:00
Andrew Tridgell
00e3fe1324 moved trans2.h and nterr.h into includes.h with all our other includes
(This used to be commit d7cd7c88fd)
2000-04-25 14:06:57 +00:00
Andrew Tridgell
d99bec7170 got rid of some more old configure tests and includes
(This used to be commit f137648504)
2000-04-17 06:11:08 +00:00
Jeremy Allison
f6be38cae2 include/byteorder.h: ALIGN4/ALIGN2 macros.
include/includes.h: Added SMB_BIG_UINT_BITS.
lib/util.c: Removed align2/align4 - use macros.
libsmb/namequery.c: Use ALIGN2.
locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
                   Needed to move to hiding POSIX locks at a lower layer.
nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros.
smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Jeremy.
(This used to be commit 491eea8a20)
2000-04-11 19:44:54 +00:00
Jeremy Allison
6bb92a6d38 Big update moving the multi-pdu support from 2.0.x into HEAD for JF
and the printer functions.
Also tidied up some header includes and got the order right so you
can now do a :

make proto
make clean
make

Jeremy.
(This used to be commit 833cd9fba9)
2000-03-09 21:45:16 +00:00
Shirish Kalele
952799d9af dded Microsoft Dfs services.
* added a new msdfs/ directory under source/
* added msdfs sources under this directory.
* modified configure setup to add a --with-msdfs configure time option

 Modified Files:
 	Makefile.in acconfig.h configure configure.in
 	include/config.h.in include/includes.h include/proto.h
 	include/smb.h include/smb_macros.h param/loadparm.c
 	smbd/negprot.c smbd/nttrans.c smbd/process.c smbd/reply.c
 	smbd/server.c smbd/trans2.c
 Added Files:
 	include/msdfs.h msdfs/README msdfs/msdfs.c msdfs/msdfs_tdb.c
 	msdfs/parse_dfs_map.c
 ----------------------------------------------------------------------
(This used to be commit 4684b4a188)
2000-03-08 22:14:30 +00:00
Jeremy Allison
3cf31a194f Added replacement functions sys_popen and sys_pclose. These are based
on the glibc source code and are safer than the traditional popen as
they don't use a shell to exec the requested command. Now we have
these functions they can be tightened up (environment etc.) as required
to make a safe popen. It should now be safe to add the environement
variable loading code to loadparm.c
Jeremy.
(This used to be commit b52e92b09d)
2000-02-15 19:36:47 +00:00
Jeremy Allison
868c81eefa Added check for SGI IRIX brokenness with semaphores when using gcc.
Code from Don Badrak <dbadrak@census.gov>
Jeremy.
(This used to be commit 773d6e504b)
2000-02-07 14:27:04 +00:00
Tim Potter
04f7d80ac3 Busting up of source/include/smb.h into smaller pieces which can be
#included by VFS modules without bringing in too much other junk.
(This used to be commit 13a2cf80f6)
2000-02-03 04:47:50 +00:00
Jeremy Allison
ace4006c9f Added hash-based stat cache code from Ying Chen.
Jeremy.
(This used to be commit b62a1bd632)
2000-01-26 21:25:35 +00:00
Andrew Tridgell
0cbae6fc3d make a br_off a SMB_BIG_UINT
(This used to be commit 0751a0ea4c)
2000-01-16 11:06:00 +00:00
Andrew Tridgell
e18a2cad69 defined br_off as a type for byte range offsets. For now I've set it
as SMB_OFF_T, we need to do some autoconf changes to generate a 64 bit
int whenever possible (eg. long long on 32 bit i386)
(This used to be commit 09dbe8bcce)
2000-01-13 12:05:40 +00:00
Jeremy Allison
fab3e0eb08 smbd/mangle.c
smbd/negprot.c: Tidyup of static initializers.
smbd/server.c: Fix -l option.
Jeremy.
(This used to be commit d120f22fef)
2000-01-08 02:16:15 +00:00
Jeremy Allison
5983a77020 Moved check_plaintext_password() into smbd/chgpasswd.c from smbd/ipc.c.
configure configure.in include/config.h.in: Added <sys/un.h> autoconf
code for Luke's UNIX domain sockets code.
Jeremy.
(This used to be commit 210d61db08)
2000-01-05 23:46:47 +00:00
Andrew Tridgell
5e9f559187 implemented talloc() as described on samba-technical. This fixes the
lp_string() bug properly.

we still need to add lp_talloc_free() calls in all the main event
loops, I've only put it in smbd and nmbd thus far.
(This used to be commit aa7f815525)
2000-01-05 06:36:36 +00:00
Andrew Tridgell
d705b62141 got rid of mem_man
yamd is much better, and doesn't require any source code changes
if you haven't seen yamd then take a look at
	http://www3.hmc.edu/~neldredge/yamd/
its excellent!
(This used to be commit 25b13f8b79)
2000-01-03 03:31:41 +00:00
Jeremy Allison
211697ee6c Converted most of the functions in lib/util_str.c to smb_ucs2_t equivalents.
Jeremy.
(This used to be commit 1ba42aca21)
1999-12-29 02:00:38 +00:00
Jeremy Allison
7c51c5ddf3 Samba now includes a full ucs2 upper to lower case (and vica versa) map table.
Jeremy.
(This used to be commit d7b72d4cbf)
1999-12-23 01:57:43 +00:00
Jeremy Allison
5b3096a32f include/includes.h: Trimmed down unicode directory entry to be POSIX complient.
lib/system.c: Trimmed down unicode directory entry to be POSIX complient.
lib/util_unistr.c: Added wstrdup().
Jeremy.
(This used to be commit ca64f4ab00)
1999-12-22 18:46:05 +00:00
Jeremy Allison
e7851ce52e First cut at unicode sys_xx functions. Now to start moving upwards.....
Jeremy.
(This used to be commit b5eb009cc3)
1999-12-22 01:29:22 +00:00
Andrew Tridgell
c2c42b8694 first pass at the database code for Samba. This also includes a test
suite and a very simple tool for manuipulating the databases.

the main code is in tdb/tdb.c and includes both mmap and file based
IO. All databases auto-expand and allow multiple simultaneous writers.

the next step is using this new capability in lots of places in Samba
where we have existing ad-hoc databases
(This used to be commit c89d29cc5e)
1999-12-21 03:04:37 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
6281c5d7a9 moved sys/un.h to after sys/socket.h. done a gnu autoconf around sys/un.h
(This used to be commit b2ea37a8f1)
1999-12-08 22:57:34 +00:00
Luke Leighton
6ddfc68e04 sys_select added one more argument (read, write selectors).
(This used to be commit e4d92ff9df)
1999-12-01 02:15:14 +00:00
Luke Leighton
d7889cd223 rewrote policy handle code to be generic (it's needed for client-side too)
attempted to fix regsetsec command
(This used to be commit eaac0923e0)
1999-11-24 18:09:33 +00:00
Matthew Chapman
fcf0300ffe Some compilers want (void) instead of just () in function declarations.
(This used to be commit c086c7ab94)
1999-08-08 04:44:36 +00:00
Tim Potter
59bd1de1a5 Put back in GNU readline support for smbclient accidentally trashed by
tridge in the clientgen.c to clientutil.c conversion.
(This used to be commit 26d66071fb)
1999-07-09 03:34:09 +00:00
Tim Potter
60e08bd35e Hived off string routines into a separate file.
(This used to be commit 4929513f13)
1999-07-09 01:59: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
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
81f866db3a added <mysql.h> autoconf test.
(This used to be commit 511ef8a58c)
1999-03-02 16:43:27 +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
Luke Leighton
0712a56047 moving rpc/rpc.h to after netinet.h
(This used to be commit 3257b72c6e)
1998-11-30 17:55:46 +00:00
Andrew Tridgell
534e6a2e1b removed include of net/route.h because it prevents compilation under
SCO 3.2 (including it also requires lots of streams stuff, making it a
total mess).

If this causes problems on some other platform then please add a
comment stating what platform and why the include is needed so we can
work out how to test for it properly.
(This used to be commit 21d779bf7d)
1998-11-29 09:29:24 +00:00
Jeremy Allison
bfc38ff872 Makefile.in: Added maintainer mode fixes.
aclocal.m4: Added AC_LIBTESTFUNC.
configure.in: Fixed -lsecurity -lsec problems.
client.c: dos_ fixes.
groupdb/aliasunix.c: Dead code removal.
include/includes.h: Added default PRINTCAP_NAME.
lib/genrand.c: dos_ fixes.
lib/replace.c: Added strtoul.
lib/system.c: dos_ fixes.
lib/util.c: dos_ fixes.
lib/util_sid.c: Signed/unsigned fixes.
lib/util_str.c: removed bad const.
locking/locking_slow.c: dos_ fixes.
printing/printing.c: dos_ fixes.
rpc_server/srv_samr.c: Dead code removal.
rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN !
smbd/dir.c: dos_ fixes.
smbd/open.c: dos_ fixes.
smbd/oplock.c: dos_ fixes.
smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes.

Jeremy.
(This used to be commit 6acb4b68f6)
1998-11-25 21:17:20 +00:00
Luke Leighton
f516cec31a re-added includes for yp_prot.h and yp_clnt.h
(This used to be commit 53339b6389)
1998-11-23 23:07:38 +00:00
Luke Leighton
d75712e52a get rid of __wait boring warning, caused by rpc/clnt.h
(This used to be commit 0fdac4b42f)
1998-11-23 23:02:16 +00:00
Luke Leighton
4cee58780c unix instance of group database API
(This used to be commit e76f593b35)
1998-11-23 21:51:05 +00:00
Jeremy Allison
e204f1d8a3 Changes to make the default prefix /usr/local/samba - as it was in 1.9.18p10.
acconfig.h configure configure.in include/config.h.in: Fixes to DEC OSF1.
libsmb/nmblib.c: Fixes to nmbd jumps in scope names.
Jeremy.
(This used to be commit 5ad77769be)
1998-11-19 04:15:23 +00:00
Jeremy Allison
9579b98237 Added OSF1 changes to HEAD (-lsecurity etc.)
groupdb/groupdb.c: Fixed compile error caught by IRIX compiler.
utils/smbpasswd.c: Fixed SunOS optind, optarg problem.
Jeremy.
(This used to be commit 30af39ae1e)
1998-11-18 22:04:24 +00:00
Jeremy Allison
a491ec96fc Fixed problem with HAVE_NETGROUP being used on platforms
that cannot support it.
Jeremy.
(This used to be commit 7a6f25ac4a)
1998-11-18 01:19:32 +00:00
Jeremy Allison
c1af0b4027 Moved PRINTCAP_NAME from smb.h to includes to allow it to
be tuned per system type.
Jeremy.
(This used to be commit c1a3346547)
1998-11-17 00:31:39 +00:00
John Terpstra
29cc8b8cd7 Updates to handle glob.h - was causing problems on SCO 5.0.4
(This used to be commit 5f7d9d4656)
1998-11-16 01:12:36 +00:00
Jeremy Allison
8fc1504ff8 Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf.
include/includes.h: Fix YP problem.
include/smb.h: Fix ZERO_STRUCTP.
lib/util_sock.c: Added strerror() in debugs.
passdb/ldap.c: Don't use snprinf, use slprintf.
rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf.
script/installman.sh: DGUX changes.
smbd/open.c smbd/oplock.c: Fixed gcc warnings.
web/swat.c: Changes USER to SWAT_USER.
(This used to be commit 4c2b5a0098)
1998-11-13 21:41:01 +00:00
Andrew Tridgell
e623b71750 reverted includes change for FreeBSD as it breaks IRIX
(This used to be commit 24b2bf1741)
1998-11-13 21:26:58 +00:00
Andrew Tridgell
2db96e3047 fixes for OSF1 compilation
(This used to be commit 5be3c37f50)
1998-11-13 03:37:01 +00:00
Luke Leighton
1e1c2ec93c rpcclient registry commands.
(This used to be commit 36fcb4a6e6)
1998-11-10 19:05:00 +00:00
Christopher R. Hertel
e81e3ce492 Still moving things around. debugparse.h will be removed from the include
directory in the next batch.  Chris -)-----
(This used to be commit 81f64d8992)
1998-10-28 20:24:41 +00:00
Jeremy Allison
94f7ce7624 Quick fixes to fix the broken tree. Needed for my morning compiles.
Chris - feel free to fix these things differently if these fixes don't
work for you.
Jeremy.
(This used to be commit 1f225abfbe)
1998-10-28 17:51:49 +00:00
Andrew Tridgell
fb556e14f3 volker was concerned about unique inode numbers and smbsh. This set of
changes uses the unique index number from a SMB_QUERY_FILE_ALL_INFO to
try to provide inode numbers. If it is 0 then use the hash of the
filename as before.
(This used to be commit 2565ccf9de)
1998-10-24 08:08:05 +00:00
Jeremy Allison
fc7d3e4caa config: Fix crypt prototype on RedHat Linux.
include/includes.h: Fix crypt prototype on RedHat Linux.
smbd/fileio.c: Fix mmap bug found by WinCE client.
smbd/ipc.c: Fix WinCE wierdness with pipes being opened as \server\pipe\lanman
smbd/password.c: Fix encrypted null passwords.
Jeremy.
(This used to be commit 475992730c)
1998-10-15 00:55:17 +00:00
Andrew Tridgell
8ed7427c1b more solaris acl fixes
(This used to be commit 1ad5bc381a)
1998-10-07 10:37:09 +00:00
Andrew Tridgell
829e72fe9c yet another attempt at making this stuff portable. This time I use
minimal includes in wrapped.c
(This used to be commit fd6a59d8ca)
1998-10-07 09:57:22 +00:00
Andrew Tridgell
d836bedb40 more OSF1 changes as well as changes to allow us to use the standard
includes.h in wrapped.c, thus making porting much simpler
(This used to be commit 6f2239c935)
1998-10-07 07:55:14 +00:00
Andrew Tridgell
57a58f592b more smbw cleanups.
- cleaned up prototyping. Unfortunately we can't auto-prototype
  wrapped.c because it replaces system functions.
- split stat functions into smbw_stat.c
(This used to be commit 04e92e692e)
1998-10-04 04:33:56 +00:00
Andrew Tridgell
959005eb5e define O_ACCMODE if not defined
(This used to be commit 48de03824e)
1998-10-03 11:51:30 +00:00
Jeremy Allison
5f7ee36056 Makefile.in: Fixed bug with continuation line causing proto to fail.
Added $(PROGS) $(SPROGS) as targets for make clean.
acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES.
configure.in: Added sys/capability.h header check.
              Added function checks for srandom random srand rand.
              Added HAVE_IRIX_SPECIFIC_CAPABILITIES test.
includes.h: Added #include <sys/capability.h>.
ntdomain.h: Moved struct acct_info into here from smb.h
smb.h: Added KERNEL_OPLOCK_CAPABILITY define.
       Moved enum action_type into rpcclient.h
       Moved struct cli_state into client.h
       Moved struct nt_client_info, struct tar_client_info, struct client_info
             into rpcclient.h
lib/genrand.c: Changed to use sys_random() & friends.
lib/smbrun.c: Lose capabilities after fork.
lib/system.c: Added set_process_capability(), set_inherited_process_capability()
              sys_random(), sys_srandom().
lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an
            32 bit mounted NFS filesystem.
nmbd/nmbd.c: Changed to use sys_random() & friends.
nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends.
passdb/ldap.c: Missed one pdb_encode_acct_ctrl call.
passdb/passdb.c: Changed to Ander's code for ' ' characters.
passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ.
script/mkproto.awk: Added 'long' to prototypes.
smbd/chgpasswd.c: Lose capabilities after fork.
smbd/open.c: Do the mmap *after* the kernel oplock.
smbd/oplock.c: Removed stub code from kernel oplock path.
               Added set_process_capability(), set_inherited_process_capability() calls.
smbd/reply.c: Initialize count = 0, offset = 0.
smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls.
tests/summary.c: Ensure we have RANDOM or RAND.
utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ.
utils/torture.c: Changed to use sys_random() & friends.

Jeremy.
(This used to be commit e8be306f23)
1998-09-25 23:40:49 +00:00
Alexandre Oliva
ac39ce3eba replace getpass() with getsmbpass() if getsmbpass.c compiles
(This used to be commit 9a5bdf5c1b)
1998-09-21 11:34:44 +00:00