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

486 Commits

Author SHA1 Message Date
Jeremy Allison
ad4144d81d Put HPUX on mmap blacklist.
Jeremy.
(This used to be commit 4d5fe9ed4f)
2001-08-02 20:52:57 +00:00
Jeremy Allison
819a911735 Added "strict allocate" per share parameter. This causes actual on-disk allocation
to be done. Without it just does the ftruncate.
Jeremy.
(This used to be commit 0b052f103e)
2001-08-01 22:13:50 +00:00
Jeremy Allison
996719cce2 Added "use mmap" for HPUX.
Jeremy.
(This used to be commit 840802f106)
2001-07-30 22:21:31 +00:00
Simo Sorce
1cbae7315f Convert other parameters (read list, write list, valid users...) to the P_LIST format.
changed functions to use list instead of strings
addedd lp_list_substitute function
(This used to be commit 7257d07563)
2001-07-24 20:02:48 +00:00
Andrew Bartlett
04932c05bf Fix the loading of configuration files using the include syntax.
We had a problem where if a % macro in the smb.conf could be ignored if the
various files it pointed to had the same time-stamp.

This changes the code to insted check that the both the time-stamp and the
substituted filename are the same over each change.

This was picked up only becouse the build-farm automaticly generates its config
files, and hence gets identical timestamps.

(Why this doesn't happen all the time I'm not entirly sure, somthing to do with
the 'test' paramater to reload_services(), but this fixes this problem).

Andrew Bartlett
(This used to be commit ebd2f9b07c)
2001-07-08 13:02:16 +00:00
Andrew Bartlett
28a53730a9 Add a new paramater: add machine script
This allows the administrator to define different scripts for adding unix users
and automaticly adding machines.  If it is not defined, it falls back to the
value of 'add user script'.

Andrew Bartlett
(This used to be commit 7a478e050f)
2001-07-07 08:45:39 +00:00
Andrew Tridgell
ca3b64fca4 removed an unreachable statement
(This used to be commit 6503f53abe)
2001-07-05 11:46:36 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +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
Simo Sorce
ef6c9d7425 "netbios aliases" and "interfaces" options change from P_STRING to P_LIST
(This used to be commit db36ed1d80)
2001-07-01 23:24:08 +00:00
Jeremy Allison
95d1969e7e param/loadparm.c: Fix for bad volume label, found by TAKAHASHI Motonobu
Samba Users Group Japan. Ensure same as in 2.2.x codebase.
Jeremy.
(This used to be commit 5a5d33b946)
2001-06-28 23:21:43 +00:00
Simo Sorce
cc6bf9a06f fixed error
using wrong pointer to test and free s/str/s/
(This used to be commit 7e5a9860fa)
2001-06-24 01:41:38 +00:00
Simo Sorce
d56e091694 fix compiler warnings
(This used to be commit 7420e2f789)
2001-06-23 14:13:32 +00:00
Jeremy Allison
fe136fe623 Fix for multibyte default service parameter from TAKAHASHI Motonobu, Samba Users Group Japan
Jeremy
(This used to be commit a2da1f91c1)
2001-06-22 22:05:47 +00:00
Simo Sorce
2e20f1147c use next_token instead of strtok.
single elemnts of list cannot be longer than a pstring (1024B now)
(This used to be commit 72b749ec89)
2001-06-21 23:33:12 +00:00
Simo Sorce
82970b833c initial support for paramter type P_LIST
it will avoid problems with lists being longer than 1024 bytes
just now only ip list parameters have been converted to the new type
(hosts allow, hosts deny, ssl hosts, ssl hosts resign)
(This used to be commit e1572f85d6)
2001-06-20 16:54:32 +00:00
Jeremy Allison
3414c71f6d Extra stuff for large readwrite support.
Jeremy.
(This used to be commit 4338ee78c3)
2001-06-08 03:02:34 +00:00
Tim Potter
af5a6bb85e Removed extraneous semicolons from some lp_ parameter definitions.
(This used to be commit 34d5272400)
2001-05-15 02:00:15 +00:00
Jeremy Allison
62b0275880 Stupidity by me..... 777 != 0777
ARGGGHHHHHHHHHH.
(Sorry).
Jeremy.
(This used to be commit 4306eff6f7)
2001-05-14 20:06:28 +00:00
Jeremy Allison
3e125823cf Got rid of iSERVICE/pSERVICE (Hungarian inspired obfuscation). Now use
ServicePtrs[i] when we're indirecting so we can see what's going on.
ZERO_STRUCTP(ServicePtrs[i]) on free_service.
Jeremy.
(This used to be commit 95dfc4a60a)
2001-05-10 22:10:31 +00:00
Jeremy Allison
89798ef71c free_service() was never setting the valid field to False. This is a bug
that's been here since 2.0.x and before.... This would cause a memleak.
Jeremy.
(This used to be commit 3412950dbd)
2001-05-10 20:58:38 +00:00
Jeremy Allison
f5243954fa Made "security XXX" masks apply to ACL set. By default they have no effect.
Removed "restrict acl with mask" - redundent.
Jeremy.
(This used to be commit 0db8a61d71)
2001-05-10 01:03:44 +00:00
Gerald Carter
495f6e6787 merge from 2.2 removing the 'domain XXX' parameters.
(This used to be commit 9aefc86e35)
2001-05-07 22:10:38 +00:00
Tim Potter
d7387f8fb5 Added some missing winbind parameters. Yes they're already documented.
(-:
(This used to be commit 657f95c89e)
2001-05-04 07:32:28 +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
Jeremy Allison
aac630b382 Had to add a "pam password change" parameter (defaults to "off") and inlined
the pam password change code to ensure that existing and working password
chat scripts don't break with 2.2.1. PAM password changing has to be explicitly
requested.
Allowed wildcards in pam password change matching (matches password chat
script matching). Had to add const (sorry Tim :-) to ms_fnmatch() to
stop warnings. Don't worry - the const changes are isolated and don't
cause any other warnings :-).
Jeremy.
(This used to be commit 47b4d82536)
2001-05-02 23:32:09 +00:00
Gerald Carter
f0d22b5413 removed references to SMBRUN
(This used to be commit 822511eb3c)
2001-04-26 13:25:46 +00:00
Herb Lewis
a4ab60a616 set "vfs object" and "vfs options" to be setable by SWAT on advanced page
change "host msdfs" to be strictly a global parameter on advanced page
change "printer admin" to be on printers page not share page (caught by
Ingo Kilian <ikilian@web.de> )
(This used to be commit 93034985e0)
2001-04-24 16:24:36 +00:00
Jeremy Allison
70b55a9abc Added "obey pam restrictions" parameter - default to "off".
Only set this to "on" if you know you have your PAM set up correctly.....
NB. Doesn't apply to plaintext password authentication, which must use
pam when compiled in.
Jeremy.
(This used to be commit 59aa99f390)
2001-04-23 20:43:20 +00:00
Andrew Tridgell
9ce5a03ccb merge from 2.2
(This used to be commit f52a5014ee)
2001-04-18 16:41:04 +00:00
Andrew Tridgell
4355098a75 hide unreadable patch from idra
(This used to be commit 7b6cfe2430)
2001-04-16 15:16:31 +00:00
Jeremy Allison
2ef68c7e92 Merge of Andrew's changes in 2.2.
Jeremy.
(This used to be commit fc76681812)
2001-04-13 19:12:06 +00:00
Jeremy Allison
faf49bbe8c Fixup warnings about extra ';' from SGI compiler.
Jeremy.
(This used to be commit 7ee448d832)
2001-04-09 21:03:48 +00:00
Jeremy Allison
950f1d9605 Added 3 params to manipulate shares. "add share command/change share command/
delete share command". Implemented "delete" - more work to come on add and
change.
Jeremy.
(This used to be commit 2e6b1759e1)
2001-04-07 00:36:38 +00:00
Jeremy Allison
1452c2d8c4 Fix from Ryo Kawahara <rkawa@lbe.co.jp> to make SWAT correctly write and smb.conf
file in utf8.
Jeremy.
(This used to be commit 42052d6079)
2001-03-26 23:13:02 +00:00
Jeremy Allison
a447217509 Two OS/2 printer fixes from Jim McDonough @ IBM.
First one adds a new info level into the lanman printing and an ioctl to the trans2 code.
    Andrew - this uses ASCII only. It looks ok to me but please check !
Second one adds a parameter "os2 driver map" that allows OS/2 driver names to be mapped.
Jeremy.
(This used to be commit da79b519e0)
2001-03-23 03:12:58 +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
Andrew Tridgell
0f2b15707a added option "enhanced browsing"
this allows users to disable the cross-subnet browse extensions that I
added to Samba a couple of years ago. This may be useful for getting
rid of empty workgroups.
(This used to be commit 978980050e)
2001-03-21 04:12:36 +00:00
Jeremy Allison
dfcfdf7250 Updated defaults for CUPS printing from Michael Sweet.
Jeremy.
(This used to be commit 2e3ec2b4fc)
2001-03-16 19:10:55 +00:00
Andrew Tridgell
853b5c87ec fixed volume_name(). It used dos_to_unix() which uses a static buffer,
and that buffer got clobbered in the trans2 QFS_VOLUME_INFO call, so
the volume label always showed as "." from NT clients.
(This used to be commit 2131d8bf76)
2001-03-16 06:17:11 +00:00
Jeremy Allison
65d35749b7 Added Michael Sweet's CUPS patch to call directly into the CUPS backend.
Parameterises the printing functions so other backends can be plugged
directly in (this is a good thing :-).
Jeremy.
(This used to be commit c0345bbaed)
2001-03-16 05:55:30 +00:00
Andrew Tridgell
c9b8da47a6 enable unicode on the wire by default in smbd
the unicode support isn't complete, but it is good enough to be usable
for a test server.
(This used to be commit e787fc1daf)
2001-03-16 02:31:24 +00:00
Jeremy Allison
d3ec09326b Added ADMIN$ share as alias for IPC$ except no guest connect. AS/U wants
to do RPC calls down this treeid.
Jeremy.
(This used to be commit 83133bab0e)
2001-03-13 00:31:07 +00:00
Gerald Carter
0bfc10011b merge of 'lanman auth' and 'min protocol' from 2.2
(This used to be commit 1d84da779a)
2001-03-09 18:59:16 +00:00
Jeremy Allison
94fc44a93c Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
(This used to be commit c0517d6f4e)
2001-02-12 16:18:02 +00:00
Jeremy Allison
8e18bd58f7 Fix inspited by Alan Romeril. 50% speedup in domain logins with this
change to default break response time of 10ms -> 0ms.
Jeremy.
(This used to be commit 541c7df16f)
2001-01-30 00:37:12 +00:00
David O'Neill
eee29958f5 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - add an access check to _spoolss_deleteprinter() to stop random
          users and passers by from deleting printers.

    source/lib/messages.c
        - converted global msg_all struct to a local in message_send_all()
          function.

    source/include/smb.h
        - added a success error code to the spoolss return codes.

    source/include/proto.h
    source/param/loadparm.c
    source/printing/printing.c
        - Added new parameter "total print jobs" to limit the total number
          of print jobs across all queues. Currently individual queues are
          limited by "max print jobs".
(This used to be commit 02f154e729)
2001-01-23 20:25:25 +00:00
David O'Neill
3d153ef9fb Small bugfix from Kenichi Okuyama <okuyamak@dd.iij4u.or.jp>:
-FN_GLOBAL_INTEGER(lp_min_wins_ttl, &Globals.max_wins_ttl)
+FN_GLOBAL_INTEGER(lp_min_wins_ttl, &Globals.min_wins_ttl)
(This used to be commit 0233ba4426)
2001-01-22 15:30:38 +00:00
David O'Neill
792ca5d989 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - Unrolled construct_notify_jobs_info() loop to only fetch
          printer info_2 structure once rather than num_print_jobs times.
        - convert command to unix codepage.
        - remove lp_remove_service() call as it prevents lp_killservice()
          from working.
        - Modified some DEBUG and DEBUGADD statements.

    source/param/loadparm.c
    source/param/params.c
        - change printer, preload, auto services to FLAG_DOS_STRING,
          reverted earlier changes to szPrintername et al, add comments.

    source/printing/load.c
        - fix bug with lp_auto_services() and strtok()

    source/printing/nt_printing.c
    source/printing/printing.c
        - remove redundant test that used SERVICE(snum)

    source/printing/pcap.c
        - add unix_to_dos() calls, add notes wrt FIXMEs for
          xxx_printer_fn() functions.

    source/web/swat.c
        - added FIXME comment.

    source/smbd/service.c
        - added comment re: dos codepage
(This used to be commit 7b774b72c2)
2001-01-17 18:47:46 +00:00
David O'Neill
b85d1ecc26 Changes from APPLIANCE_HEAD:
source/param/loadparm.c
        - changed lp_add_printer() to convert szPrintername and comment
          from unix to DOS codepage.
(This used to be commit 6a1f55b325)
2001-01-16 18:17:55 +00:00
David O'Neill
17ab0c2acc Changes from APPLIANCE_HEAD:
source/include/proto.h
    source/param/loadparm.c
    source/passdb/passdb.c
    source/rpc_server/srv_samr.c
        - add support for "hide local users" option to HEAD.
(This used to be commit 44dc339fe7)
2001-01-10 16:05:41 +00:00
Jeremy Allison
615af12cf2 Fix from "B.V.Dean" <B.V.Dean@ukc.ac.uk> to add "dos filemode" parameter
to allow a chmod to be done if the user has write access to a file, just
like Windows allows. Off by default (compare with "dos filetimes" parameter).
Jeremy.
(This used to be commit 8abdf0e29f)
2001-01-09 20:34:37 +00:00
David O'Neill
2e87e6e8c8 Changes from APPLIANCE_HEAD:
- trivial typo in definition of enum_printing[]
	  (source/param/loadparm.c)
	- fixed printer status display bug.  When no jobs existed in queue, the
	  clients were not properly notified of printer status.  This caused
	  native tools for pausing/unpausing a print queue to not work.
	  (source/printing/printing.c)
(This used to be commit c533e77f19)
2000-12-13 21:24:06 +00:00
Jeremy Allison
cf5b71994d file_lines_load/file_lines_pload can now optionally convert unix_to_dos()
on read.
Jeremy.
(This used to be commit 76b8dd376d)
2000-12-07 19:26:04 +00:00
Gerald Carter
0dcbafe2b9 Another large patch for the passdb rewrite.
o added BOOL own_memory flag in SAM_ACCOUNT so we could
    use static memory for string pointer assignment or
    allocate a new string

  o added a reference TDB passdb backend.  This is only a reference
    and should not be used in production because
	- RID's are generated using the same algorithm as with smbpasswd
 	- a TDB can only have one key (w/o getting into problems) and we
	  need three.  Therefore the pdb_sam-getpwuid() and
	  pdb_getsampwrid() functions are interative searches :-(

    we need transaction support, multiple indexes, and a nice open
    source DBM.  The Berkeley DB (from sleepycat.com seems to fit
    this criteria now)

  o added a new parameter "private dir" as many places in the code were
    using lp_smb_passwd_file() and chopping off the filename part.
    This makes more sense to me and I will docuement it in the man pages

  o Ran through Insure-lite and corrected memory leaks.  Need for
    a public flogging this time Jeremy (-:



-- jerry
(This used to be commit 4792029a29)
2000-11-21 05:55:16 +00:00
Jeremy Allison
e8d43bbfe4 Tuyrn debug timestamps on by default.
Add Tim's lpq race fix.
Jeremy.
(This used to be commit d43405bc47)
2000-11-15 01:11:38 +00:00
David O'Neill
f9680a444b Changes from APPLIANCE_HEAD:
- merged Tim's vlp (virtual lp) test program.  Enable it with
      -DDEVELOPER or by using ./configure.developer
	  (source/include/smb.h source/configure.developer
	   source/printing/lpq_parse.c source/param/loadparm.c
	   testsuite/printing/.cvsignore testsuite/printing/Makefile.vlp
	   testsuite/printing/vlp.c)
(This used to be commit fbcf83140d)
2000-11-14 15:26:53 +00:00
Gerald Carter
9fede0dc0d Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
(This used to be commit 0b92d0838e)
2000-11-13 23:03:34 +00:00
Jeremy Allison
1cb444057a David Lee's utmp patch (finally). Thanks David !
Jeremy.
(This used to be commit b809a2d0c8)
2000-10-28 19:38:39 +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
af33ececd9 Yeah - not setting getwd_cache to True as default, that'd do it for a 5x
performance hit..... :-) :-).
Jeremy.
PS. Yes this was my fault for everyone who wants to throw rotten fruit...
(This used to be commit 4f5bbc38ce)
2000-10-24 19:44:02 +00:00
Christopher R. Hertel
f0bd621a50 Bug report that on some systems extended characters are being returned as
negative values from the mygetc() function.  I've modified the return
line so that it should return values in the 0..255 range for legitimate
characters.

This change should probably be copied into SAMBA_2_2 but I haven't checked
that tree out yet.

Chris -)-----
(This used to be commit e2ce5ce0fd)
2000-10-18 01:36:26 +00:00
Jeremy Allison
26a4a34d36 Fix for growing printing.tdb by adding check on job creation.
This also updates the printing.tdb db version to 2.
Jeremy.
(This used to be commit 13395514c6)
2000-10-11 02:26:27 +00:00
Jeremy Allison
5d4f5cdddc Integrated support for NT and OS/2 lpq parsing. Code from
Jim McDonough
Infoprint Manager Development
Linux Technology Center
IBM Boulder

Jeremy.
(This used to be commit d9eedd5db1)
2000-10-07 00:48:27 +00:00
Jeremy Allison
077c41cc60 Fix for printf attribute from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>
Added "codepage directory" patch from Peter.Polkinghorne@brunel.ac.uk
Jeremy.
(This used to be commit e49566c2e2)
2000-10-06 23:35:55 +00:00
Jeremy Allison
3ad2ee22bb utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.
mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>.
jeremy.
(This used to be commit b40191d271)
2000-10-03 02:12:14 +00:00
Jeremy Allison
b43b2e4f8a Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector them
through the VFS. All file access/directory access code in smbd should now
go via the vfs. Added vfs_chown/vfs_chmod calls. Still looking at vfs_get_nt_acl()
vfs_set_nt_acl() call API design.
Jeremy.
(This used to be commit f96625ec12)
2000-09-27 19:09:59 +00:00
Jeremy Allison
5be845af6b Changes from John Reilly to add a parameter "show add printer wizard" that
allows Samba to turn off the display of APW (hmmm. This should probably
be a share specific parameter, I'll fix that in another commit).
Also a few small changes to JF's code to fix compiler warnings about
missing return statements and also change '//' comments (C++) to /* .. */
comments (C).
Jeremy.
(This used to be commit 0a9ccc99b3)
2000-09-26 00:54:18 +00:00
Jeremy Allison
13904f585c param/loadparm.c: Fix based on Damian's code to stop printer scripts getting overwritten.
rpc_parse/parse_spoolss.c: Tidyup to call function for relstring arrays.
Win2000 now does "Add Printer" successfully !!!!!

Jeremy.
(This used to be commit d666b958bc)
2000-09-19 22:32:56 +00:00
Gerald Carter
3b33053b88 missed removing the static declaration of strwicmp()
jerry
(This used to be commit d09d8a3f4b)
2000-08-29 16:47:20 +00:00
Gerald Carter
4326894f6a needed to use strwicmp() in smbclient code, so I moved it to util_str.c
and made it non-static



--jerry
(This used to be commit dfdca21bd9)
2000-08-29 14:33:39 +00:00
Andrew Tridgell
bbc7918ad0 arrgh.
whoever added "auto" parameters in loadparam only supported "True", "False"
and "Auto", and did not support "Yes" and "No" like booleans. This
means anyone using "preferred master = yes" didn't get what they
expected!
(This used to be commit 311a4dfb9a)
2000-08-28 02:06:25 +00:00
Jeremy Allison
295d684f53 Fix case where volumename could be returned as UNIX charset or DOS codepage
depending on where it came from.
Jeremy.
(This used to be commit cfbf78085d)
2000-08-11 00:53:13 +00:00
Andrew Tridgell
db24453581 added printer admin option
any user in that list can do anything to a printer
(This used to be commit 7b5912be15)
2000-08-09 04:19:18 +00:00
Jeremy Allison
49fcb300de Added John Reilly's enumports/addprinter/delprinter scripting code plus the
fix for the Win9x printer drivers.
Changed command names to add "command" string on the end for some consistancy
with the other scripting commands.
Added '%P' option to tdbpack/unpack to store long comment string.
Made port name be "Samba Printer Port" if no enum port script given.
Fixed prs_uint32_pre code to cope with null args.
Jeremy.
(This used to be commit 902ada6379)
2000-07-31 20:41:51 +00:00
Christopher R. Hertel
b35f21fb3a First cut toward adding WINS server failover.
*Note: failover doesn't actually work yet!*  It's just that the code I'm
adding provides all of the pieces necessary.

I do have one big question.  Something that I'll have to ask Jeremy, I'm
thinkin'.  In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to
set up the Unicast subnet.

...so what happens if the WINS server changes?

My guess is either:
  a) nothing.
  b) I'd have to change the unicast subnet entry whenever the WINS server
     changes.

Urq.

BTW, the lp_wins_server() function no longer returns the WINS server name
or IP.  It returns the list of WINS servers entered in smb.conf.  To get
the currently 'live' WINS server, use the wins_srv() function.

Fun, eh?

Chris -)-----
(This used to be commit cc08bdc74f)
2000-07-19 01:21:30 +00:00
Andrew Tridgell
a7f6c0a642 don't need shmem any more
(This used to be commit a81371a4fd)
2000-07-06 03:53:49 +00:00
Jeremy Allison
eecab5c660 Changed enumports to show printernames as ports. In line with 'the grand plan' :-)
Gerald & I discussed with HP. More changes to follow.
Jeremy.
(This used to be commit 193a248bed)
2000-06-22 23:59:22 +00:00
Jeremy Allison
68b4dc2ad1 Changed default printer driver to "" from NULL.
Jeremy.
(This used to be commit 54bf7c12b8)
2000-06-21 02:24:59 +00:00
Andrew Tridgell
c89f1ae0cf reverted lukes changes in param/
apparently they were not deliberate, they were probably a result of
Luke accidentally copying a CVS directory from one spot to another in
error
(This used to be commit 2d35d0cf1d)
2000-06-16 23:57:09 +00:00
Luke Leighton
db2f46df1e more update.
(This used to be commit ac91ef3093)
2000-06-16 15:53:13 +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
26848a3478 a first pass at Linux kernel oplocks support
(This used to be commit 3253085d98)
2000-06-10 14:29:31 +00:00
Andrew Tridgell
52cb05678a continued the split of the kernel level oplocks code into a more
modular form. In this pass I added oplock_irix.c and added a "struct
kernel_oplocks" that describes a kernel oplock implementation.
(This used to be commit b5ceab8102)
2000-06-10 13:38:07 +00:00
Jeremy Allison
a62d17dc61 Change from "David S. Chappell" <David.Chappell@mail.cc.trincoll.edu>
to make "printer driver file" a share parameter. This fits better with
the new NT printing subsystem.
Jeremy.
(This used to be commit 7afb68461f)
2000-06-08 22:24:13 +00:00
Jeremy Allison
b9fedcb2de param/loadparm.c: Looks like someone ran indent on this !
passdb/smbpass.c: Insure uninitialized memory reference fix.
printing/nt_printing.c:
rpc_server/srv_spoolss_nt.c: Insure memory leak fixes.
smbd/unix_acls.c: Shadow ref fix.
Jeremy.
(This used to be commit d175d3ebef)
2000-06-01 21:00:37 +00:00
Luke Leighton
e67aa6b43c space in front of lp_preexec() causing make proto to not detect this fn.
(This used to be commit 3a1ebfa080)
2000-05-31 05:42:16 +00:00
Luke Leighton
a6e52f2b2e make proto
(This used to be commit 62271c30f4)
2000-05-29 00:20:21 +00:00
Luke Leighton
140523dc46 lp_server_role() + use in srv_reg.
(This used to be commit 82e47e268c)
2000-05-28 23:34:34 +00:00
Luke Leighton
9d1bc48232 TIMESTAMPS ARE IRRITATING AS HELL WHEN DEBUGGING! NGGGH!!
switched default to False, i expect someone to revert this very soon [for
security reasons],
but for now am doing this so i don't get exasperated by seeing stupid
timestamps splitting up debug output.
(This used to be commit 038dab9053)
2000-05-27 02:49:23 +00:00
Andrew Tridgell
89a532aa2c removed lp_revalidate()
(This used to be commit fba5886a05)
2000-05-24 07:21:22 +00:00
Shirish Kalele
651946153e The new msdfs implementation that uses symlinks to point to other
servers. Very intuitive.

Removed the dfs map parsing code and tdb maintenance code (files
msdfs/parse_dfs_map.c & msdfs/msdfs_tdb.c), dfs map loading and unloading
calls (param/loadparm.c smbd/server.c).

Added code to display msdfs format symlinks as directories in a
transact2_findfirst/findnext. (smbd/trans2.c)

Modified msdfs/msdfs.c to use the msdfs symlinks to
create dfs referrals.

Changed msdfs/README to reflect new operability.
(This used to be commit 6803d2574f)
2000-05-16 01:13:16 +00:00
Andrew Tridgell
479c73559e use "winbind separator" option for domain/user separator character
(This used to be commit 6cbb826b15)
2000-05-12 06:30:45 +00:00
Andrew Tridgell
bbc16ef8da I found a better way of handling deleted auto printers
(This used to be commit f838707820)
2000-05-10 11:48:30 +00:00
Andrew Tridgell
277932cb79 remove autoloaded printers that are no longer in /etc/printcap when we
get a HUP
(This used to be commit 23f16c5ce6)
2000-05-10 11:20:46 +00:00
Andrew Tridgell
ddc9b8b406 more merging
it is now at the stage that winbindd can compile in the head branch,
but not link
(This used to be commit d178c00aae)
2000-05-10 09:49:55 +00:00
Andrew Tridgell
12a38a4632 added winbindd options in head branch, so it is possible to combine
branches
(This used to be commit cd5e249427)
2000-05-06 15:06:45 +00:00
Tim Potter
c7ddaacd26 Fix for crash bug in OpenConfFile() if no smb.conf exists.
(This used to be commit b531ddb265)
2000-05-05 04:18:22 +00:00
Andrew Tridgell
32d5416b6a split the username in the vuser structure into a separate
userdom_struct. As the name implies this also contains a domain
(unused at the moment).

This will be important shortly, as operation in appliance mode needs
the domain to be always carried with the username.
(This used to be commit ee8546342d)
2000-05-02 13:55:42 +00:00
Shirish Kalele
b39cee0bb9 Added info level 1005 to netsharegetinfo (is the share a DFS root)
Added dfs_server announcement in set_default_server_announce_type()
(This used to be commit 99d07e1352)
2000-04-28 18:36:47 +00:00
Andrew Tridgell
19f946ba6f converted a bunch more functions to use a fd instead of a FILE*
to support some of this I added the following functions in util_file.c

file_lines_pload : load lines from a pipe
file_pload : load a pipe into memory
(This used to be commit a09470817c)
2000-04-16 11:00:21 +00:00
Jeremy Allison
a018d6b326 Removed "ole locking compat" parameter (no longer used).
We now get/set/check POSIX locks, but I still need to code up the
close fd braindamage...
Jeremy.
(This used to be commit 3de058bd43)
2000-04-12 23:01:11 +00:00
Jeremy Allison
8316237e9c Code to map tdb locks onto POSIX. Mainly placeholder code at the moment,
but the structure is done enough so that Andrew can look it over and give
a yea/nay decision.
Jeremy.
(This used to be commit db96f83e34)
2000-04-12 17:59:09 +00:00
Jean-François Micouleau
dc2d1544b3 changed all the status code to ERROR_xxx instead of NT_STATUS_xx which are
wrong in the spoolss case.

fxed a bug in the job notify code (that's the polite answer), the truth is
different: there is a bug in the NT spooler service, including SP6a and
NT2K.

changed the default lpcommand in the LPRNG case.

	J.F.
(This used to be commit 396f73c11b)
2000-04-05 10:05:32 +00:00
Jeremy Allison
d6981c2d3a Fix for compiler warning about invalid structure type.
jeremy.
(This used to be commit 58a16e2718)
2000-04-03 23:06:03 +00:00
Jeremy Allison
6b201d043a Fix for coredump in testparm.
Jeremy.
(This used to be commit c4c06650dd)
2000-03-30 20:32:33 +00:00
Jeremy Allison
0583c25087 Fixed crash bug in new handle_netbios_name code.
Jeremy.
(This used to be commit 26963f2f8e)
2000-03-27 20:25:34 +00:00
Jeremy Allison
e601c0259e Fixes to add "paranoid" option to popen. Checks some basic things.
Jeremy
(This used to be commit 3b8cbb10de)
2000-03-16 20:55:37 +00:00
Jeremy Allison
01d88573ea include/smb.h:
smbd/negprot.c:
smbd/reply.c: Fixes to recognise Win2k.
param/loadparm.c: Put debug timestamp parameter back to correct default.
smbd/nttrans.c: Fix to detect Win2k unicode bug with transact create.
Jeremy.
(This used to be commit bb100352ab)
2000-03-13 20:05:18 +00:00
Shirish Kalele
0307b23a31 Cleaning up the warnings from configure.developer.
Found that Jeremy had already made some of the changes.
(This used to be commit ca02d9f821)
2000-03-10 22:53:36 +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
Luke Leighton
3958c39106 added a tcon test: make two tconXs with the same user/pass, open a file
with one of them and try to write to the file with the other.
(This used to be commit f8d3ce0419)
2000-03-07 21:55:42 +00:00
Jeremy Allison
4175061348 Added "source environment" parameter from Nicolas Williams <Nicolas.Williams@wdr.com>.
Jeremy.
(This used to be commit f29847cbee)
2000-02-16 02:35:53 +00:00
Jean-François Micouleau
59ac32c255 Jeremy can you check lib/util_unistr.c for codepages support ?
I added 2 UNICODE <-> ASCII functions which _don't_ honor codepage
support.

	J.F.
(This used to be commit b81dc7b7f8)
2000-02-07 16:22:16 +00:00
Tim Potter
6df7bfbd9f Added 'vfs object' and 'vfs options' smb.conf parameters.
(This used to be commit f872518972)
2000-02-03 05:11:26 +00:00
Herb Lewis
230f81bf64 made "enable" and "disable" the default "lpresume" and "lppause" commands
for SYSV instead of the lpc commands (since these are BSD commands)

I still don't like the default "lppause" and "lpresume" commands for
SYSV since these seem to be SUN specific additions to the lp command
(at least I don't find them in IRIX and HPUX). I think this should be
inside an ifdef SUN??? but I'm not sure what the define should be so
I have left it for now.
(This used to be commit d3557b7f72)
2000-01-30 01:00:00 +00:00
Jeremy Allison
ebfef23a7d Fix from Motonobu TAKAHASHI to sort code page parameters first.
Needed when reading the rest of smb.conf.
Jeremy.
(This used to be commit 171bef4d95)
2000-01-29 00:03:50 +00:00
Jeremy Allison
d867b86721 Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.
Stop makeing function calls for every use of skip_multibyte_char. This function
is called several *million* times during a NetBench run :-).
Jeremy.
(This used to be commit e5a3deba46)
2000-01-26 00:12:35 +00:00
Jeremy Allison
d85e6f2c9a Moved Herb's global -> local changes to HEAD.
Jeremy.
(This used to be commit bdb2ff6a38)
2000-01-20 17:16:07 +00:00
Jeremy Allison
ea9909cb34 Added Herb's swat fixes.
Jeremy.
(This used to be commit fa3d91de89)
2000-01-18 05:11:29 +00:00
Andrew Tridgell
b3b634ff42 use string_set() instead of string_init()
bug pointed out by Richard
(This used to be commit 070f49397f)
2000-01-16 11:18:04 +00:00
Jeremy Allison
3a6c2069d7 Added "inherit permissions" patch.
Fixed locking bug found by Andrew.
Jeremy.
(This used to be commit 38dffd360d)
2000-01-14 01:41:04 +00:00
Jeremy Allison
6d81c60a05 Added missing #ifdef for WITH_UTMP.
Jeremy.
(This used to be commit 465c5a8308)
2000-01-13 00:42:04 +00:00
Jeremy Allison
1e2f92af55 Added utmp fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
(This used to be commit 95d37a1d25)
2000-01-12 03:09:17 +00:00
Andrew Tridgell
3c37bfe1aa netbios scope is a DOS_STRING
(This used to be commit e42b629baa)
2000-01-07 08:48:04 +00:00
Andrew Tridgell
171da4d787 this looks like a big commit, but it isn't really :)
This fixes our netbios scope handling. We now have a 'netbios scope' option
in smb.conf and the scope option is removed from make_nmb_name()

this was prompted by a bug in our PDC finding code where it didn't append
the scope to the query of the '*' name.
(This used to be commit b563be824b)
2000-01-07 06:55:36 +00:00
Jeremy Allison
f0a3883379 Removed unneeded #define.
Jeremy.
(This used to be commit c33b6d2aba)
2000-01-06 21:58:26 +00:00
Jeremy Allison
8bd94c178f Re-added "dfree command" functionality that was described in the man pages
but was not in the code.
Jeremy.
(This used to be commit f4898a1f16)
2000-01-06 01:41:27 +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
Jeremy Allison
794aafe349 Added "crap" fix for rotating string buffers. (Increased to 20, added #define).
Andrew - please fix this properly when you have time :-).
Jeremy.
(This used to be commit 8515bdb39c)
2000-01-04 19:19:07 +00:00
Jeremy Allison
e004340f71 Fix based on code from monyo@home.monyo.com to fix multibyte continuation
issues.
Jeremy.
(This used to be commit 023f90e766)
1999-12-21 02:15:53 +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
f6276724ba changed function name of get_home_dir() to get_unixhome_dir(), to stop
clash with gnu readline library.

fixed issue with [homes] service not being there - call lp_add_home()
just before starting the msrpc processing.
(This used to be commit 054195df9b)
1999-12-12 21:00:35 +00:00
Luke Leighton
6b56ebb7cf added two new params: "trusted domains" and "trusting domains".
these _may_ not actually ever get used, as trust relationships
really need to be established with shared secrets, and you need
to get the SID of the trusted and trusting domains, so this
may have to go in a private/xxx.mac file.
(This used to be commit 71f1213867)
1999-11-16 17:27:41 +00:00
Tim Potter
1aef4d76c9 Support for arbitrary VFS options in smb.conf. Options are of the
format 'vfs option = name = value'.  It would be nice to get rid of
the first equals sign, but that would involve modifications to the
smb.conf parser.

There are a couple of naughties here - I've added a P_PTR enum as the
VFS options are parsed in param/loadparm.c and stored as a linked list
of structures.  I couldn't for the life of me write a FN_LOCAL_PTR()
macro to generate a lp_vfsoptions() function that actually worked so
for the moment it is coded by hand.
(This used to be commit 89ad85f0a3)
1999-07-22 04:55:13 +00:00
Luke Leighton
1f33d5a8aa code from bertl to allow remap of default built-in names to anything.
parameter is "builtin rid file".
Copyright 1999 Bertl <bp@vpnet.at>
(This used to be commit 80d3677843)
1999-07-14 19:21:44 +00:00
Luke Leighton
8f1404739f Jean-Francois Micouleau's rewritten DFS patch, originally written by
Nigel Williams.  despite the data format being *exactly* the same as
NT's, this still doesn't work yet.  more work needed.
(This used to be commit 270981960b)
1999-07-12 18:46:15 +00:00
Luke Leighton
73891ca8e4 improving authentication code (tidyup).
(This used to be commit ab1a6aa42d)
1999-06-29 18:47:06 +00:00
Luke Leighton
89d51caba5 added server ntlmv2 false/auto/true parameter, defaults to off.
(This used to be commit 209944dabc)
1999-05-01 01:41:28 +00:00
Jean-François Micouleau
be552ca350 rpc_parse/parse_misc.c : defined a new BUFFER5 struct
include/ntdomain.h     : added rpc_spoolss.h include statement
include/proto.h
include/rpc_dce.h      : added definition of RPC_ALTER_CONTEXT request &
                         reply
param/loadparm.c       : 2 new options for NT printing support and some
                         changes to initial values in the LPRNG case.
rpc_parse/parse_prs.c  : added prs_uint16s()
rpc_parse/parse_rpc.c  : added SYNT_SPOOLSS_V1 and code for the
                         alter-context support.
rpc_server/srv_pipe.c  : alter-context support
smbd/nttrans.c
smbd/server.c
include/rpc_misc.h
Makefile.in
include/smb.h

Jean Francois
(This used to be commit 4c515804b7)
1999-04-27 10:43:32 +00:00
Matthew Chapman
5be247c62c Allow "Yes" and "No" as well as "True" and "False" in the three-state
enumeration.
(This used to be commit 4ed67ccf1c)
1999-04-11 11:47:33 +00:00
Matthew Chapman
9c2520e6cd Trying to improve DC location & browsing performance for the average user
who doesn't know what an LMB or DMB is.

* check_master_browser_exists now performs the check the first time
around, so if there is indeed no master browser then Samba takes up the job
much faster.

* Upped default OS level to 32. There is no reason why some stupid little
Windows box should become LMB instead of a Samba *server*.

* "domain master" now defaults to "auto". Currently this attempts to
become DMB iff Samba is the PDC (ala Windows NT). "preferred master" also
defaults to "auto", which enables preferred master iff Samba is DMB.

* lp_server_role now just returns the predetermined role, rather than
working it out each time, since the server role is becoming very heavily
used (esp for the BDC code).
(This used to be commit 4a23a358b5)
1999-04-11 10:23:19 +00:00
Tim Potter
0309a98851 Added configuration parameter 'vfs object' to specify loadable object
file containing a VFS implementation.
(This used to be commit a7af7193e3)
1999-04-04 04:54:50 +00:00
Luke Leighton
00d86ccb1c Benjamin Kuit's latest mysql mods. issue with "make proto" needs to be
resolved.
(This used to be commit d59a2e669a)
1999-03-03 20:48:48 +00:00
Luke Leighton
236cea4efa Benjamin Kuit's MYSQL SAM Database implementation.
Copyright (C) Benjamin Kuit <bj@mcs.uts.edu.au> 1999.
(This used to be commit fdf61e1dab)
1999-03-01 16:31:14 +00:00
Luke Leighton
07948f3f2d server type announcements modified to include the "role" of the server:
domain member, pdc, bdc.
(This used to be commit d95bb252f8)
1999-02-02 19:53:10 +00:00
Richard Sharpe
775bff681c Adding first of the fixes for SSL.
A whole bunch of string variables in loadparm.c were
not being initialized properly.  Programs crashed as a result.

This set of code not tested, but same code tested elsewhere,
and all this guarded by #ifdef HAVE_SSL
(This used to be commit fb6048bb86)
1999-01-24 14:08:55 +00:00
Luke Leighton
699bae847f matthew chapman's ldap code, to date. plus docs!
(This used to be commit 2c438c86cb)
1998-12-07 21:37:17 +00:00
Luke Leighton
30038de462 weekend work. user / group database API.
- split sam_passwd and smb_passwd into separate higher-order function tables

- renamed struct smb_passwd's "smb_user" to "unix_user".  added "nt_user"
plus user_rid, and added a "wrap" function in both sam_passwd and smb_passwd
password databases to fill in the blank entries that are not obtained
from whatever password database API instance is being used.

NOTE: whenever a struct smb_passwd or struct sam_passwd is used, it MUST
be initialised with pwdb_sam_init() or pwd_smb_init(), see chgpasswd.c
for the only example outside of the password database APIs i could find.

- added query_useraliases code to rpcclient.

- dealt with some nasty interdependencies involving non-smbd programs
and the password database API.  this is still not satisfactorily
resolved completelely, but it's the best i can do for now.

- #ifdef'd out some password database options so that people don't
mistakenly set them unless they recompile to _use_ those options.

lots of debugging done, it's still not finished.  the unix/NT uid/gid
and user-rid/group-rid issues are better, but not perfect.  the "BUILTIN"
domain is still missing: users cannot be added to "BUILTIN" groups yet,
as we only have an "alias" db API and a "group" db API but not "builtin-alias"
db API...
(This used to be commit 5d5d7e4de7)
1998-11-29 20:03:33 +00:00
Luke Leighton
0c9df3c610 jean-francois pointed out problem with "lp_domain_role()" code, you
could never be a PDC.
(This used to be commit 2bcc540af8)
1998-11-24 14:42:42 +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
768761820e Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.
Tidied up some of the mess (no other word for it). Still doesn't
compile cleanly. There are calls with incorrect parameters that
don't seem to be doing the right thing.

This code still needs surgery :-(.

Jeremy.
(This used to be commit 18ff93a9ab)
1998-11-17 20:50:07 +00:00
Luke Leighton
74d539f557 - group database API. oops and oh dear, the threat has been carried out:
the pre-alpha "domain group" etc parameters have disappeared.

- interactive debug detection

- re-added mem_man (andrew's memory management, detects memory corruption)

- american spellings of "initialise" replaced with english spelling of
  "initialise".

- started on "lookup_name()" and "lookup_sid()" functions.  proper ones.

- moved lots of functions around.  created some modules of commonly used
  code.  e.g the password file locking code, which is used in groupfile.c
  and aliasfile.c and smbpass.c

- moved RID_TYPE_MASK up another bit.  this is really unfortunate, but
  there is no other "fast" way to identify users from groups from aliases.
  i do not believe that this code saves us anything (the multipliers)
  and puts us at a disadvantage (reduces the useable rid space).
  the designers of NT aren't silly: if they can get away with a user-
  interface-speed LsaLookupNames / LsaLookupSids, then so can we.  i
  spoke with isaac at the cifs conference, the only time for example that
  they do a security context check is on file create.  certainly not on
  individual file reads / writes, which would drastically hit their
  performance and ours, too.

- renamed myworkgroup to global_sam_name, amongst other things, when used
  in the rpc code.  there is also a global_member_name, as we are always
  responsible for a SAM database, the scope of which is limited by the role
  of the machine (e.g if a member of a workgroup, your SAM is for _local_
  logins only, and its name is the name of your server.  you even still
  have a SID.  see LsaQueryInfoPolicy, levels 3 and 5).

- updated functionality of groupname.c to be able to cope with names
  like DOMAIN\group and SERVER\alias.  used this code to be able to
  do aliases as well as groups.  this code may actually be better
  off being used in username mapping, too.

- created a connect to serverlist function in clientgen.c and used it
  in password.c

- initialisation in server.c depends on the role of the server.  well,
  it does now.

- rpctorture.  smbtorture.  EXERCISE EXTREME CAUTION.
(This used to be commit 0d21e1e609)
1998-11-17 16:19:04 +00:00
Jeremy Allison
375e53826c include/local.h:
include/smb.h:
param/loadparm.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-).
printing/printing.c: Added J.F.'s latest fix.
rpc_parse/parse_misc.c:
parse_reg.c:
rpcclient/cmd_reg.c:
rpcclient/display.c: SGI compiler signed/unsigned issues.
smbd/reply.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-).
utils/testparm.c: Added extra test.
Jeremy.
(This used to be commit 9668a5ef50)
1998-11-10 20:51:25 +00:00
Jeremy Allison
5c3295c16d Default for SMB_PASSWD program was set to smbpasswd ! This explained the problems
John & Andrew were having with smbpasswd. This would cause the smbpasswd
to be changed *twice* - this the second decrypt would fail.
Changed it to be "/bin/passwd" and changed the name of the macro
to PASSWORD_PROGRAM to make it clear this is not an smb password
changer.
Jeremy.
(This used to be commit 8c16253654)
1998-11-10 00:37:14 +00:00
Andrew Tridgell
ab521a11a1 I talked to Dave Miller and he thinks that we should have TCP_NODELAY
on by default on OSes that support it, given the network IO pattern
that Samba uses. He doesn't think it will cause problems.
(This used to be commit 15016aa024)
1998-11-09 04:17:11 +00:00
Jeremy Allison
548b417d40 codepages/codepage_def.936: Updated comment.
param/loadparm.c: Removed "networkstation user login", "domain controller", and "domain sid" parameters.
passdb/passdb.c: Removed "networkstation user login" code and changed bug test code
                 to only check once for a bad password server. This will stop the
                 complaints of many "bad login" audit records in NT PDC logs.
utils/smbpasswd.c: Removed check for "domain controller".
Jeremy.
(This used to be commit d6e6e936b5)
1998-11-07 05:32:37 +00:00
Andrew Tridgell
f6d91d0565 add an option to enable/disable nt pipes
(This used to be commit c161b2f850)
1998-10-18 19:29:19 +00:00
Andrew Tridgell
52d52a5131 somehow "in_client" got included twice in two places.
(This used to be commit 378290bfe1)
1998-10-07 01:03:35 +00:00
Richard Sharpe
0cf1ea4e2e Added capability for smbclient to use the local WINS server on the same
machine if WINSsupport configured
(This used to be commit 1398feebbc)
1998-10-06 23:46:01 +00:00
Andrew Tridgell
217804ba43 ignore *.po32 files
(This used to be commit 01de9a50e0)
1998-10-05 12:36:44 +00:00
Andrew Tridgell
ca3d1b9bf0 removed requirement of having a smb.conf for smbwrapper to work.
(This used to be commit af58bf2ff8)
1998-10-05 02:55:53 +00:00
Andrew Tridgell
3a8232644e started basic support for solaris 2.5 in smbwrapper.
(This used to be commit e5c7cabae4)
1998-10-04 14:02:50 +00:00
Andrew Tridgell
65cfbc97ae - ignore *.p files
(This used to be commit 5328ecbc41)
1998-10-03 08:33:22 +00:00
Andrew Tridgell
88460e63c5 set the default fstype for IPC$ to "IPC". I'm not sure if this will
make any difference, but it is the right thing to do.
(This used to be commit a655a8a051)
1998-09-30 10:52:48 +00:00
Jeremy Allison
5b4d94e20f (Finally) implemented "max open files" as a global smb.conf parameter.
Sets up the files array correctly - limited by the smb.conf parameter
and by the max fd's per process as found by getrlimit().
Jeremy.
(This used to be commit eca24bd243)
1998-09-30 01:49:24 +00:00
Jeremy Allison
5a8458c377 libsmb/clientgen.c: Fixed signed/unsigned compile warnings spotted by Herb.
param/loadparm.c:
smbd/oplock.c: Allow kernel oplocks to be turned off in the smb.conf file.
smbd/server.c: Move init_structs() to after the smb.conf file is loaded - preparation
               for making a "max open files" parameter.
Jeremy.
(This used to be commit 6a261517a0)
1998-09-30 01:05:51 +00:00
Alexandre Oliva
a2d7f765e8 get away with dummy and .dummy files
(This used to be commit 90a8a02484)
1998-09-29 04:52:17 +00:00
Richard Sharpe
e1d962659f Now have a better solution to the need to have smblcient find
a WINS server if running on the WINS server.  As suggested by
Andrew, we have a flag, in_client=False by default, and set it
to True in the client.  loadparam.c checks this and sets
szWINSserver to 127.0.0.1 when in_client && bWINSsupport.

BTW, we seem to have picked up and unused value in some of
Luke's new code.
(This used to be commit b665756bfc)
1998-09-29 04:43:40 +00:00
Andrew Tridgell
a97a4b8b99 made bad boolean values stand out a little better
(This used to be commit 270f4b0f84)
1998-09-28 12:52:51 +00:00
Richard Sharpe
376742415b Backed out that just as ill-considered change :-(
A more careful change will be needed in the name lookup code.
(This used to be commit edfc3ab99b)
1998-09-28 09:40:46 +00:00
Richard Sharpe
c8c89585a3 The previous fix for WINS on the WINS server was wrong. It
caused nmbd to exit :-(

We now set the variable szWINSserver after the smb.conf file
has been processed, but only of we are a WINS server.
(This used to be commit 17212991cf)
1998-09-28 09:22:06 +00:00
Richard Sharpe
2d87954bc0 Make sure that WINS Server = 127.0.0.1 in case we
do not set a value in smb.conf.

This will be the case if we are a WINS server, or if
we don't know what we are doing.

The result is that smbclient can access a WINS server if it
is running on the same machine as the WINS server
(This used to be commit a343998666)
1998-09-28 08:00:07 +00:00
Alexandre Oliva
cf971f88ac automated generation of .dummy files for each subdirectory;
dummy.in files are no longer needed, and new directories will be taken
care of automatically, at configure (or config.status --recheck) time
(This used to be commit 237a8e5fe6)
1998-09-28 00:14:36 +00:00
Jeremy Allison
aab2fe0216 First cut at kernel oplocks. This should have no effect unless runnin
on a machine that supports them in autoconf.

Move various functions out of lib/util.c into smbd/process.c
and smbd/oplock.c where they belong.

Jeremy.
(This used to be commit c3c5e13f85)
1998-09-23 01:48:45 +00:00
Alexandre Oliva
e649750cb4 major autoconf clean-up
fix problems in builds with srcdir!=builddir
(This used to be commit 1ffc3b807a)
1998-09-21 09:07:08 +00:00
Andrew Tridgell
93dfc79888 added a per-share parameter "fstype" that allows you to select the
filesystem type that will be reported to the client. If unspecified
then it defaults to FSTYPE_STRING (currently "Samba").

This is useful for cdroms where you want to set the fs type to CDFS.
(This used to be commit 4332e2c93d)
1998-09-20 15:40:52 +00:00
Jeremy Allison
184db9266e configure configure.in include/config.h.in include/includes.h
Fixed bugs in readline autoconf.

param/loadparm.c smbd/open.c smbd/oplock.c: Started on kernel oplock
        code - checking forced by above issue. Should not be used
        currently.

Jeremy.
(This used to be commit f939efac9e)
1998-09-18 17:50:18 +00:00
Jeremy Allison
b8b67f4fab configure configure.in: Added checks for statvfs64. Last bit of 64 bit widening (I hope :-).
include/config.h.in: Added #undef STAT_STATVFS64.
include/includes.h: Added SMB_STRUCT_STATVFS type, Changed SMB_BIG_INTEGER to
                    SMB_BIG_UINT and SMB_BIG_INT types.
include/smb.h: Added flag defines from CIFS spec.
lib/debug.c: Fixed one more mode_t issue.
lib/system.c: Added sys_statvfs wrapper.
lib/util.c: Changed trim_string to use size_t.
param/loadparm.c: Moved "blocking locks" into locking section. Alphabetised
                  locking options. Question - shuld we do this for all options ?
passdb/ldap.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/nispass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/smbpass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
smbd/dfree.c: Changed to use 64 bit types if available. Moved to use unsigned
              types.
smbd/dosmode.c: Fixed one more mode_t issue.
smbd/negprot.c: Changed literals to be FLAG_ #defines.
smbd/nttrans.c: Removed dead code.
smbd/open.c: Changed disk_free call.
smbd/process.c: Changed literals to be FLAG_ #defines.
smbd/reply.c: Changed disk_free call.
smbd/trans2.c: Fixed but in SMB_QUERY_FS_VOLUME_INFO call. Was using
               UNICODE - should use ascii.
tests/summary.c: Added STAT_STATVFS64 check.
Jeremy.
(This used to be commit c512b1b91f)
1998-09-17 23:06:57 +00:00
Jeremy Allison
ac9b687cc2 configure configure.in: Added tests for fseek64 and ftell64.
config.h.in: Added fseek64 and ftell64.
includes.h: Added definition of SMB_BIG_INTEGER.
smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
access.c: Tidyup of dbug statement.
system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t.
asyncdns.c: Tidyup of comment.
loadparm.c: Tidyup of set_default_server_announce_type() function definition.
ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
smbpassfile.c: Use sys_fseek().
chgpasswd.c: Tidyup of debug statement.
dosmode.c: Changed mode calls to use mode_t.
ipc.c: Removal of dead code.
nttrans.c: Changed mode calls to use mode_t.
open.c: Changed mode calls to use mode_t.
pipes.c: Removal of dead code.
reply.c: Removal of dead code.
trans2.c: Removal of dead code. Changed mode calls to use mode_t.
Jeremy.
(This used to be commit c381d32e3d)
1998-09-17 19:16:12 +00:00
Jeremy Allison
6e0c276ec8 Added back groupname map stuff removed by Andrew's "slash 'n' burn"
tactics :-). Protected by #ifdef until used.

Fixed bug in fd_attempt_close() where a pointer to potentially
free'd memory was returned. I hate that.

Added "blocking locks" as a per-share option for performance testing.

Changed is_mangled() so it will return true if called with a pathname
and any component of the pathname was mangled (it was already attempting
to do this, but not checking for a '/' as end-of-mangle).

This should be a better fix for the wierd stat cache bug Andrew identified.

Jeremy.
(This used to be commit 0de01f4598)
1998-09-08 19:21:04 +00:00
Andrew Tridgell
4fc5a74ffa add a "stat cache" boolean smb.conf option. (defaults to on)
I think we need this so we can rule out stat cache bugs when dealing
with bug reports. If we ask a user to disable the stat cache and the
problem persists then we know it isn't a stat cache bug. The stat
cache code is sufficiently complicated that it can be pretty hard to
tell if it is causing problems or not.
(This used to be commit c83f3775cd)
1998-09-06 01:37:14 +00:00
Andrew Tridgell
e9ea36e4d2 tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...

I went through these are deleted many of them, making others static
(finddead also reports functions that are used only in the local
file).

in doing this I have almost certainly deleted some useful code. I may
have even prevented compilation with some compile options. I
apologise. I decided it was better to get rid of this code now and add
back the one or two functions that are needed than to keep all this
baggage.

So, if I have done a bit too much "destroying" then let me know. Keep
the swearing to a minimum :)

One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
(This used to be commit 2204475c87)
1998-09-05 05:07:05 +00:00
Jeremy Allison
98f524bde4 Bugfix for leak in reference counted file struct.
Added "nt smb support" parameter to allow NT SMB's to be turned off.
Jeremy.
(This used to be commit 63f65f5027)
1998-09-05 03:14:40 +00:00
Jeremy Allison
38142a1ebb This checking fixes the statcache bug that stopped NetBench from running
correctly. Added new parameter "stat cache size" - set to 50 by default.

I now declare the statcache code officially "open" for business :-).
It gets a hit rate of 97% with a NetBench run and seems to make
using a case insensitive run as efficient as a case sensitive run.

Also tidied up our sys_select usage - added a maxfd parameter and
also added an implementation of select in terms of poll(), for systems
where poll() is much faster. This is disabled by default.

Jeremy.
(This used to be commit 779b924ec1)
1998-08-28 21:46:29 +00:00
Andrew Tridgell
7bc68de378 added a warning when loading a parameter that is deprecated
(This used to be commit c8b0041570)
1998-08-26 01:57:17 +00:00
Andrew Tridgell
2c065107b1 changed the default permissions code to do this:
if ((sbuf->st_mode & S_IWUSR) == 0)
      result |= aRONLY;

rather than the very complex user/group permissions checks we do
currently. This is equivalent ot setting "alternate permissions = yes"
in the old code. The change is motivated by three main reasons:

1) it's basically impossible to second guess whether a file is
writeable without trying to open it for writing. ACLs, root squash etc
just make it too hard.

2) setting it not RONLY if the owner can write is closer to what NT
does (eg. look at a cdrom - files are not marked read only).

3) it prevents the silly problem of copying files from a read only
share to a writeable share and then finding you can't write to them as
windows preserves the RONLY flag. Lots of people get bitten by this
when they drag a folder from a Samba drive. It also hurts some install
programs.

I have also added a new flag type for loadparm.c called
FLAG_DEPRECATED which I've set for "alternate permissions". I'll soon
add code to testparm to give a warning about deprecated options.
(This used to be commit c4363a12fd)
1998-08-25 06:40:42 +00:00
Jeremy Allison
8afc9c80ac Changed ASSERT macros to SMB_ASSERT macros as some systems already
have an ASSERT macro defined.
Jeremy.
(This used to be commit dbe6ad014a)
1998-08-24 21:49:10 +00:00
Andrew Tridgell
038e3433d3 added new smb.conf option "panic action". see my samba-technical
explanation.
(This used to be commit c6899df44c)
1998-08-21 11:37:40 +00:00
Andrew Tridgell
b9623ab59e this is the bug change to using connection_struct* instead of cnum.
Connections[] is now a local array in server.c

I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.
(This used to be commit c7ee025ead)
1998-08-14 17:38:29 +00:00
Andrew Tridgell
bad66abfe7 moved username.c into lib/ so we no longer $(PASSDB_OBJ) in most
utilities
(This used to be commit 745d38bfe7)
1998-08-10 05:22:10 +00:00
Andrew Tridgell
87bcd5502c added ignore rules for the dummy files
(This used to be commit 687f76a17d)
1998-08-09 11:25:49 +00:00
Andrew Tridgell
27ff18a184 these dummy files are needed for autoconf processing
(This used to be commit be762dc3de)
1998-08-09 11:24:15 +00:00
Andrew Tridgell
963e96f3a9 added --with-nisplus-home option
(This used to be commit 70000c2190)
1998-08-08 01:15:14 +00:00
Jeremy Allison
c0c057c0df loadparm.c: Added "debug timestamp" synonym for Chris.
nttrans.c: Moved common code into function in server.c
           Removed left over debug level 0.
server.c: Moved common code into function in server.c
Jeremy.
(This used to be commit 34ef55b722)
1998-08-04 01:01:26 +00:00
Christopher R. Hertel
31c09de03c More formatting changes. Mostly converted some DEBUG() calls to DEBUGADD()
so that we wouldn't get too many timestamps.

Chris -)-----
(This used to be commit 3e7e5fad37)
1998-08-03 22:10:53 +00:00
Jeremy Allison
7448091da6 First implementation of ChangeNotify - this version only checks
for changes in the directory modify timestamps. A better version
will look at the requested client flags, and create a hash that
represents the current state of the directory, and check against
this instead.
debug.c: Added lp_timestamp_logs() function.
loadparm.c: Added "change notify timeout" in seconds (default 60)
- this is the scan rate for a directory.
            Added ""timestamp logs" boolean - default True. Turns
off log timestamps (so I can read them :-).
nttrans.c: ChangeNotify implementation.
server.c: ChangeNotify implementation.
shmem_sysv.c: Added exits on shmem errors (without them smbd can
              core dump if some calls fail).
smb.h: Added ChangeNotify flags for future use.
util.c: Tidied up typedef.
Jeremy.
(This used to be commit a0748c3f53)
1998-08-03 19:07:55 +00:00
Christopher R. Hertel
f1abfacd4d I finished removing timestring() calls from DEBUG() messages. Also went
through and changed some DEBUG() calls to DEBUGADD() to combine output
under a single timestamp.  There were too many timestamps.

Note that Jeremy has told me that he's working on adding a config parameter
to turn timestamps off.  Cool.

Chris -)-----
(This used to be commit 247dbc9a24)
1998-08-03 18:13:13 +00:00
Jeremy Allison
7284bb5ca0 Makefile.in: Moved UBIQX stuff into UTILOBJ.
loadparm.c: Added "ole locking compatibility" option (default "true").
locking.c: Changes to implement union in files_struct.
locking_shm.c: Changes to implement union in files_struct.
nttrans.c: Made opening a directory explicit (we have to).
           Added create directory code for nttrans.
reply.c: Changes to implement union in files_struct.
server.c: Changes to implement union in files_struct. Added create directory code.
trans2.c: Changes to implement union in files_struct.
smb.h: Changes to implement union in files_struct.
util.c: Changed linked list code to UNIQX linked list. This will make
        the other lists I need to implement for ChangeNotify and blocking
        locks easier.
Jeremy.
(This used to be commit 3a5eea850b)
1998-07-30 21:18:57 +00:00
Andrew Tridgell
64578c0589 merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417)
1998-07-29 03:08:05 +00:00