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

308 Commits

Author SHA1 Message Date
Andrew Tridgell
4d7565342d added more complete C99 snprintf test 0001-01-01 00:00:00 +00:00
Andrew Tridgell
c7aeb2254d - 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
0001-01-01 00:00:00 +00:00
Andrew Tridgell
8bda86c0bf added asprintf test 0001-01-01 00:00:00 +00:00
Andrew Tridgell
9ebd90904e added test for C99 compliant vsnprintf 0001-01-01 00:00:00 +00:00
Jeremy Allison
3cfcaaca5b Fixed REPLACE_GETPASS test.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c6f25e84d3 Re-ran autoheader; autoconf to fix pam_smb build.
Jeremy.
0001-01-01 00:00:00 +00:00
John Terpstra
550cc5c182 Added Steve Langasek <vorlon@netexpress.net> pam_smbpass support 0001-01-01 00:00:00 +00:00
Gerald Carter
cf9e34c79b updating changes with 2.2 (comment lines in ./configure --help) 0001-01-01 00:00:00 +00:00
Jeremy Allison
d4b1c0be2e Added smb_ prefix to all Samba wrapper pam functions.
Fixed off by one bug using StrnCpy instead of strdup().
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1d4438f077 AIX ACLs donated by IBM.
Merge Andrew's fnmatch fix for WfW.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1cfc542685 Added --with-codepagedir as RedHat 6.2 and 7.x place them differently.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c236287463 Added POSIX_ACL support for *BSD. Patch from jedgar@fxp.org. Changed
a bit to use AC_TRY_LINK to ensure functions are available for link
instead of AC_TRY_COMPILE.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
32397e5bc6 configure:
configure.in:
include/config.h.in:
include/profile.h:
smbd/vfs-wrap.c:
smbd/vfs.c:
Added fchmod and fchown to VFS (sorry Gerald - but we needed them anyway).
smbd/dosmode.c:
smbd/files.c:
printing/printfsp.c:
smbd/close.c:
smbd/open.c:
Fixed "dos filemode" correctly so there are no race conditions. Forces test
of open of file O_WRONLY before allowing fchmod as root. Afterwards, calls
standard close function that preserves POSIX locks due to POSIX-me-harder
braindamage. :-). Andrew please review this code.
Also - in removing the tmpdir param in smbrun an extra NULL parameter
was missed in each print_run_command() call (which is a varargs fn.).
Now fixed.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
fc76681812 Merge of Andrew's changes in 2.2.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
9b32b8a8cf To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke
XFS ACL code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
144a290681 Changed the order of -kPIC and -kpic.
Added patch from Michael Davidson <md@sco.COM> for Solaris/Unixware ACLS.
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
2097298565 keep cflags from being duplicated if defined in environment 0001-01-01 00:00:00 +00:00
Jeremy Allison
0865366f6b Added XFS ACLs on Linux. Code from John Trostel <jtrostel@connex.com>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
13765eca71 configure configure.in include/config.h.in lib/replace.c: Added test and replacement
for setlinebuf which apparantly doesn't exist on HPUX 11.
include/byteorder.h:
rpc_parse/parse_prs.c:
Ding Dong the witch is dead ! :-). Ok, I'm happy 'cos I've finally deleted
all the *HORRIBLE* DBG_RW_XXX and RW_XXX macros from include/byteorder.h.
They were macros that included macros that had conditional macros included.
No one understood them (they were the cause of most of the bigendian issue
bugs). Finally, I went into parse_prs.c and inlined all of that stuff with
regular function calls. They're understandable, they're easy to edit and
they don't include macros !
JF - please look at the one comment I added (JF PLEASE CHECK). I have
tested this partly with IRIX (a bigendian system) running with AS/U on
a Solaris box in SGI's lab, and I've also confirmed these new changes
work with W2K (vmware) but there may be the odd bug lurking. Herb, if
you could re-checkout and test again with this code that would help.

Extra.  Fixed bug spotted by the sharp eyes of JF - big endian unicode
packet would cause a early truncate of string parsing as we were checking for a char *
0, not a uint16 * 0.

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
80ce12d953 standards.h only exists on IRIX 6.x and above (Herb please check !).
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e1487eb2c4 much better readline support from Simo Sorce, with some mods from me
to make it a bit simpler
0001-01-01 00:00:00 +00:00
Jeremy Allison
c59a5db9c2 Added patch from Urban Widmark <urban@teststation.com> modified by me to
enable large file support on Linux if glibc >= 2.2 and kernel >= 2.4.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f0d11b6997 rpc_client/cli_netlogon.c: Fixed incorrect printf.
Added Solaris ACL support.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3ded1e6bd5 configure configure.in smbd/posix_acls.c smbd/dosmode.c: Fix for zero permission W2K profiles.
libsmb/cliconnect.c rpc_client/cli_login.c smbd/reply.c: codepage fixes from Tim.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
523c919356 Fixed typo with acl_set_fd() not needing an ACL_TYPE_T parameter.
Ensure HAVE_NO_ACLS is set in configure if ACL support not selected.
Jeremy
0001-01-01 00:00:00 +00:00
Tim Potter
671be48221 Cosmetic fixups for large file support message. 0001-01-01 00:00:00 +00:00
Jeremy Allison
da6ae57501 Added better configure test for POSIX ACLs. Fixed stupid typo in sysacls.c
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6ae63e502e Working code to read POSIX ACLs on a Linux system using the bestbits
ACL patch from http://acl.bestbits.at/.
configure support needs more work (just assumes correct headers at
the moment). ACL writing needs adding.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
644aa834e5 Update required after changes to configure.in 0001-01-01 00:00:00 +00:00
Jeremy Allison
9dea7b7c25 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
4792029a29 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
0001-01-01 00:00:00 +00:00
Gerald Carter
0435af4417 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
0001-01-01 00:00:00 +00:00
Jeremy Allison
70cecfefc8 Fixes from David Lee for utmp handling.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
44ed8abb2a Fix for yp_get_default_domain from Neil Hoggarth <neil.hoggarth@physiol.ox.ac.uk>
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
2003c11c3e Re-ran autoconf 0001-01-01 00:00:00 +00:00
Jeremy Allison
711f15ac23 Fixes for IRIX kernel oplocks and systems that don't have nss.h
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
fabe1f350e 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
92d0382c9e fixed autoconf test for kernel change notify support 0001-01-01 00:00:00 +00:00
Andrew Tridgell
44766c39e0 totally rewrote the async signal, notification and oplock notification
handling in Samba. This was needed due to several limitations and
races in the previous code - as a side effect the new code is much
cleaner :)

in summary:

- changed sys_select() to avoid a signal/select race condition. It is a
  rare race but once we have signals doing notification and oplocks it
  is important.

- changed our main processing loop to take advantage of the new
  sys_select semantics

- split the notify code into implementaion dependent and general
  parts. Added the following structure that defines an implementation:

struct cnotify_fns {
	void * (*register_notify)(connection_struct *conn, char *path, uint32 flags);
	BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t);
	void (*remove_notify)(void *data);
};


then I wrote two implementations, one using hash/poll (like our old
code) and the other using the new Linux kernel change notify. It
should be easy to add other change notify implementations by creating
a sructure of the above type.

- fixed a bug in change notify where we were returning the wrong error
  code.

- rewrote the core change notify code to be much simpler

- moved to real-time signals for leases and change notify

Amazingly, it all seems to work. I was very surprised!
0001-01-01 00:00:00 +00:00
Andrew Tridgell
fbeb980434 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.

I also removed the maintainence mode from the Makefile. It was causing
too much trouble. If someone really likes it they can keep a patch
around to enable it themselves.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
0368f68529 - changed HAVE_KERNEL_OPLOCKS to HAVE_KERNEL_OPLOCKS_IRIX
- added autoconf test for HAVE_KERNEL_OPLOCKS_LINUX
0001-01-01 00:00:00 +00:00
Shirish Kalele
e0965a80bd Changed MS_DFS to WITH_MSDFS throughout.
Fixed trans2 calls on IPC$ to let dfs referral calls through.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e23f43e7d3 we don't need fnmatch.c any more 0001-01-01 00:00:00 +00:00
Andrew Tridgell
f137648504 got rid of some more old configure tests and includes 0001-01-01 00:00:00 +00:00
Andrew Tridgell
e8905a557a removed some obsolete configure tests (sysv ipc etc) 0001-01-01 00:00:00 +00:00
Andrew Tridgell
0b68660159 The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
0ec1072e01 split out the lpq parsing code into a separate file
printing/lpq_parse.c

getting ready for the new printing backend
0001-01-01 00:00:00 +00:00
Herb Lewis
351b25727e fixes for broken IRIX header file merged from 2.0 branch 0001-01-01 00:00:00 +00:00
Jeremy Allison
3a39acd353 IRIX include fixes.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
567713a07c Added check for LL suffix to long long ints needed by AIX 4.3.x compiler
to allow successful build.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f02999dbf7 acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.

Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.

Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
b183c24220 Adding libtool support to HEAD branch. We're going to need this for
various things yet to be merged from TNG.  The smbwrapper stuff should
probably be ported across too.
0001-01-01 00:00:00 +00:00
Shirish Kalele
4684b4a188 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
 ----------------------------------------------------------------------
0001-01-01 00:00:00 +00:00
Jeremy Allison
b52e92b09d 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
773d6e504b Added check for SGI IRIX brokenness with semaphores when using gcc.
Code from Don Badrak <dbadrak@census.gov>
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
8b26be1e82 Backed out -rdynamic linker option. It seems to be GNU ld specific.
Need a platform independant way of exporting symbols for dlopen().
Perhaps this is only needed for certain platforms anyway...
0001-01-01 00:00:00 +00:00
Tim Potter
4c14a343d1 Add -rdynamic to LDFLAGS if libdl found. 0001-01-01 00:00:00 +00:00
Jeremy Allison
94c075faee Wrapped popen calls in HAVE_POPEN - needed if we are to add the
env patch.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
95d37a1d25 Added utmp fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
210d61db08 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1ba42aca21 Converted most of the functions in lib/util_str.c to smb_ucs2_t equivalents.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 0001-01-01 00:00:00 +00:00
Luke Leighton
b2ea37a8f1 moved sys/un.h to after sys/socket.h. done a gnu autoconf around sys/un.h 0001-01-01 00:00:00 +00:00
Tim Potter
26d66071fb Put back in GNU readline support for smbclient accidentally trashed by
tridge in the clientgen.c to clientutil.c conversion.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
ef3d61a80a 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
511ef8a58c added <mysql.h> autoconf test. 0001-01-01 00:00:00 +00:00
Richard Sharpe
3598d90a32 More changes to get SSL working with 2.x.x
Now, we have most of the configure support done, next
have to fix Makefile.in and other things ...
0001-01-01 00:00:00 +00:00
Richard Sharpe
524c4d2978 Fixing up configure to properly support ssl 0001-01-01 00:00:00 +00:00
Andrew Tridgell
ccf6443887 and in head branch:
make sure we include sys/mman.h if available
0001-01-01 00:00:00 +00:00
Luke Leighton
d11859041d updated for Matt Chapman's ldap code 0001-01-01 00:00:00 +00:00
Jeremy Allison
6acb4b68f6 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
c89642ff3f yp_prot.h and ypclnt.h correct: ypprot.h and yp_clnt.h wrong... 0001-01-01 00:00:00 +00:00
Luke Leighton
d502388234 re-added ypprot.h and yp_clnt.h 0001-01-01 00:00:00 +00:00
Luke Leighton
e76f593b35 unix instance of group database API 0001-01-01 00:00:00 +00:00
Jeremy Allison
34d8f4b1c4 acconfig.h configure configure.in include/config.h.in: Added -lsec and -lsecurity checks
in a more sane way.
rpc_client/cli_netlogon.c: Removed correct bits check to see if this works with an NT3.51 PDC.
rpc_parse/parse_samr.c: Fixed compile warnings.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b02d21a73d Fixed stupid blunder where I renamed getpwanam to getpwnam.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
2d62dc26f4 Makefile.in: Added passing of CPPFLAGS into Makefile.
configure
configure.in
include/config.h.in: Fixes for AIX4.x. AIX *will not*
                     enable large file support of *any* description unless
                     either -D_LARGE_FILES or -D_LARGE_FILES_API are defined.
                     I chose "-D_LARGE_FILES" as this leads to cleaner code...

Also fixed bug where getpwnam was listed as getpw(a)nam in configure.in.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1ef6d3bd63 Sync up with 2.0 code.
Added HPUX autoconf changes.
Added "gross hack" printer code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5ad77769be 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
30af39ae1e 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
7a6f25ac4a Fixed problem with HAVE_NETGROUP being used on platforms
that cannot support it.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
18ff93a9ab 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
0d21e1e609 - 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.
0001-01-01 00:00:00 +00:00
John Terpstra
5f7d9d4656 Updates to handle glob.h - was causing problems on SCO 5.0.4 0001-01-01 00:00:00 +00:00
Andrew Tridgell
263b13222c compile with optimisation by default on all compilers
this has 2 effects:

1) non gcc platforms get some optimisation
2) it disables -g by default which means the samba binaries won't be
   so huge (they were over 60MB on some systems)
0001-01-01 00:00:00 +00:00
Jeremy Allison
9ee8f39aed Removed acconfig.h configure configure.in include/config.h.in: Made smbwrapper not made
by default.
nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include
	   file problem...sigh.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4c2b5a0098 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
78e63e17c5 fixed compile for FreeBSD 0001-01-01 00:00:00 +00:00
Jeremy Allison
f09ab9b522 Makefile.in configure configure.in include/proto.h smbd/noquotas.c smbd/quotas.c:
Added quotas patch for autoconf from Dejan Ilic <svedja@lysator.liu.se>.
printing/printing.c: Filenames with spaces patch from Allan Bjorklund <allan@umich.edu>
utils/nmblookup.c: Fix usage() function.
smbd/reply.c: Split out the security=server and security=domain checks into
              check_server_security() and check_domain_security() to aid the
              writing of the 'hack' appliance mode invented by John Schimmel.
Jeremy.
0001-01-01 00:00:00 +00:00
Alexandre Oliva
93b195d1e9 looks like someone forgot to commit these... 0001-01-01 00:00:00 +00:00
Andrew Tridgell
a66c56d70e don't enable smbsh/smbwrapper on systems where we can't work out how
to generate PIC code
0001-01-01 00:00:00 +00:00
Jeremy Allison
bdba1bcf20 Fixed crypt problems on IRIX with prototype.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
475992730c 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
5d92e00397 auto-detect the right flag for the compiler to produce PIC code 0001-01-01 00:00:00 +00:00
Andrew Tridgell
a3339c111d removed lukes acl check in configure (not needed) 0001-01-01 00:00:00 +00:00
Luke Leighton
361c1b7ea9 added aclent_t autoconf test (defines as an int if it doesn't exist).
this is to stop a compilation error caused by make proto putting
functions that are wrapped in #if HAVE_ACLxxx code.

maybe a better fix would be to have mkproto.awk exclude any functions
wrapped in #if HAVEs that don't exist.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
ed0b43294a fix the SEEKDIR_RETURNS_VOID test 0001-01-01 00:00:00 +00:00
Andrew Tridgell
2a25034b03 detect __sys_llseek() 0001-01-01 00:00:00 +00:00
Andrew Tridgell
6f2239c935 more OSF1 changes as well as changes to allow us to use the standard
includes.h in wrapped.c, thus making porting much simpler
0001-01-01 00:00:00 +00:00
Andrew Tridgell
4dbfec81b2 test whether seekdir() returns void or not 0001-01-01 00:00:00 +00:00
Andrew Tridgell
77aea37bb8 - no getdents on OSF1
- try a new method of handling prototype mismatches in wrapped.c. We
  now try to disable prototypes!
0001-01-01 00:00:00 +00:00
Andrew Tridgell
50526c45ba reran autoconf 0001-01-01 00:00:00 +00:00
Andrew Tridgell
ffa7d0461f some changes for OSF1 support in smbwrapper (just preliminary changes,
doesn't work yet)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b7ecbca3af added a wrapper for fork()
in a fork we have to close all server connections otherwise we can end
up with two processes writing to the same socket.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
fc602e5e26 set HOST_OS after canonical system test 0001-01-01 00:00:00 +00:00
Andrew Tridgell
cbba700cb5 reran autoconf for IRIX changes 0001-01-01 00:00:00 +00:00
Andrew Tridgell
8aa6c16eeb test for creat64() 0001-01-01 00:00:00 +00:00
Andrew Tridgell
a32eb93b0e IRIX uses -shared for shared libray creation. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
3860269305 test for loff_t and offset_t to support llseek() on Solaris and Linux. 0001-01-01 00:00:00 +00:00
Alexandre Oliva
f604fd1a8b revert 64-bit file support; it's hard-coded already 0001-01-01 00:00:00 +00:00
Alexandre Oliva
43ec91ac1f added 64-bit file support 0001-01-01 00:00:00 +00:00
Andrew Tridgell
2087e0ce89 added pread pread64 pwrite pwrite64 and open64 0001-01-01 00:00:00 +00:00
Andrew Tridgell
bdf02378c6 tests for readdir64 0001-01-01 00:00:00 +00:00
Andrew Tridgell
32695b1606 reran autoconf 0001-01-01 00:00:00 +00:00
Alexandre Oliva
8f95ee8fc3 bin/cvsignore: deleted, so that bin can be removed from the repository
.cvsignore: added bin; it is no longer part of the source tree

smbwrapper/smbsh: now auto-generated from smbsh.in
smbwrapper/.cvsignore: added smbsh

configure.in: generate @builddir@
configure, include/stamp-h.in: regen

Makefile.in: new target `smbwrapper'; sped up directory creation
0001-01-01 00:00:00 +00:00
Andrew Tridgell
c4e4508178 more solaris 2.5 fixups. It now seems to be working pretty well. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
ee349bb329 fixed some stuff for Linux that porting to Solaris broke 0001-01-01 00:00:00 +00:00
Andrew Tridgell
e5c7cabae4 started basic support for solaris 2.5 in smbwrapper. 0001-01-01 00:00:00 +00:00
Alexandre Oliva
90a8a02484 get away with dummy and .dummy files 0001-01-01 00:00:00 +00:00
Jeremy Allison
e0567433bd Changes to test in configure if capabilities are enabled on a system.
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Michael Warfield
8a4730f619 Two changes in this ball...
1) Changes to smbmnt.c, smbmount.c, and smbumount.c allow them to compile on
both RedHat 4.x (libc 4.x) systems and RedHat 5.x (glibc 2) systems.

2) Changes to Makefile.in and configure.in (and subsequently configure) are to
configure for smbmount, smbumount, and smbmnt to compile.

This adds a "--with(out)-smbmount" option to configure.  Sanity checking is
not present yet.  You can specify this if you are not on linux, it just
won't compile.
0001-01-01 00:00:00 +00:00
Alexandre Oliva
237a8e5fe6 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
0001-01-01 00:00:00 +00:00
Jeremy Allison
548634915f Added Kerberos4 support patches from Johan Hedin <johanh@fusion.kth.se>
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e8be306f23 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.
0001-01-01 00:00:00 +00:00
Alexandre Oliva
64cba1cc8e check whether system type is the same as stored in the cache (full
stand-alone macro, candidate for inclusion in the next release of autoconf)

create configure flag --enable-maintainer-mode, that enables automatic
rebuilding of configure from configure.in and aclocal.m4, and of
config.h.in based on acconfig.h.  This assumes autoconf and autoheader
are available.  Maintainer mode also introduces automatic dependency
tracking of include files, but it depends on features provided by gcc
and GNU make, so you must not enable maintainer mode if you are not
using any of these
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f123172c42 automatically detect changes in the system type and exit, telling
the user to remove config.cache
0001-01-01 00:00:00 +00:00
Jeremy Allison
c3c5e13f85 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.
0001-01-01 00:00:00 +00:00
Alexandre Oliva
9a5bdf5c1b replace getpass() with getsmbpass() if getsmbpass.c compiles 0001-01-01 00:00:00 +00:00
Alexandre Oliva
1ffc3b807a major autoconf clean-up
fix problems in builds with srcdir!=builddir
0001-01-01 00:00:00 +00:00
Jeremy Allison
89a4a73caf Now that Alexandre Oliva has explained the use of acconfig.h to
me, I'm adding the HAVE_LIBREADLINE and other stuff correctly.

Thanks Alexandre :-).

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f939efac9e 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c512b1b91f 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
9c8ecd994d configure, configure.in: Added 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
36544fe547 Added ssize_t to configure code.
Got 'religion' about using size_t and ssize_t for read/write stuff
as part of the code to expose 64 bits to the client.

This checkin does all the 'easy' stuff - such as all the read/write/lock
calls - but now comes the harder parts (open & friends) and all the
file enquiry functions.....

Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
5c7717f033 added a configuration summary at the end of ./configure. It also
aborts if essential functions are not available.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
ead0338ad2 some people are foolishly running ./configure from other than the
source directory! This adds a new "trivial" test that makes sure that
the autoconf tests are working. It aborts the configure run if not.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5910d07bbf Modified dev_t and ino_t code to be 64 bit clean (including changes
to oplock break message passing). I think that smbd/nmbd are now
inode and offset size independent (at least for 32 bit and 64 bit
systems).

Now to expose all this new functionality to NT clients.....

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
422f1dd450 More 64 bit stuff - now the fcntl locks are 64 bit clean.
Nearly at the stage where I can expose the 64-bit-ness to
the NT clients....
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
14500936c3 Ok - this is the 64 bit widening check in. It changes the configure
to check for stat64 and friends, and then changes much of Samba
to use the data type SMB_OFF_T for file size information.

stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide
the 64 bit calls if needed.

Note that this still does not expose 64 bit functionality to the
client, as the changes to the reply_xxx smb's are not yet done.

This code change should make these changes possible.

Still to do before full 64 bit-ness to the client:

fcntl lock code.
statfs code
widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T
types being in place).

Let me know if wierd things happen after this check-in and I'll
fix them :-).

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3d9ec96de5 configure.in, configure: include/config.h.in: Added stropts and poll.
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where
               all the other defines live (changed them from typedefs to
               defines).
Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T
in preparation for moving to size independed (ie. 64 bit clean) device
and inode access. Stat call wrapper comes next :-).

Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
d1005b5692 added loads of pointless rpcsvc/ and rpc/ include files, all because
rpcsvc/ypclnt.h wants a struct dom_binding.  knock-on include effect under
freebsd 2.1.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
dbe333b590 added a test for a working setresuid 0001-01-01 00:00:00 +00:00
Andrew Tridgell
bf136b4fa8 added include of sys/resource.h 0001-01-01 00:00:00 +00:00
Andrew Tridgell
d933a47be6 moved the printing related files to a separate printing/ directory. 0001-01-01 00:00:00 +00:00
Jeremy Allison
1b9cbcd02e configure: Changes for extra headers.
configure.in: Source for header changes.
client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile.
include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers.
include/includes.h: Headers for the above.
include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int).
lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/debug.c: Fixed signal functs.
lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile.
libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem_sysv.c: Fixed error messages in sysV stuff.
nmbd/asyncdns.c: Fixed signal functs.
nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/nttrans.c: Fixed fsp code path.
smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem.
smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/trans2.c: Fixed core dump bug.
smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
c7ee025ead 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
4fae7f129e the autoconf scripts are now converted to the new directory structure
now the Makefile .....
0001-01-01 00:00:00 +00:00
Andrew Tridgell
d121204890 we have to have the test for -lsocket before the test for some
functions (notably innetgr) to ensure we don't replace them if they
are in -lsocket
0001-01-01 00:00:00 +00:00
Andrew Tridgell
70000c2190 added --with-nisplus-home option 0001-01-01 00:00:00 +00:00
Andrew Tridgell
4eb28f7148 added test for getpwanam(). 0001-01-01 00:00:00 +00:00
Andrew Tridgell
cae580ccc3 added HAVE_FUNCTION_MACRO test 0001-01-01 00:00:00 +00:00
Andrew Tridgell
15b666a0ce fixed sin_len test for FreeBSD 0001-01-01 00:00:00 +00:00
Andrew Tridgell
ddffbcbcb1 test for a broken inet_ntoa and replace it if necessary (for
IRIX+gcc-2.8.1)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
8b25fe7341 get rid of the runtime test for broken getgroups() and add a compile
time test instead. This also allows us to get rid of the igroups
element of a couple of structures.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e7b6e8ef61 hopefully permissions are right now 0001-01-01 00:00:00 +00:00
Andrew Tridgell
0cf6529341 still trying to get permissions right - CVS doesn't commit permissions changes it seems 0001-01-01 00:00:00 +00:00
Andrew Tridgell
e16c467303 checkin configure again in order to get permissions right 0001-01-01 00:00:00 +00:00
Andrew Tridgell
3bda7ac417 merge from the autoconf2 branch to the main branch 0001-01-01 00:00:00 +00:00