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

321 Commits

Author SHA1 Message Date
Jeremy Allison
036b1a8b09 Added set/get SD's on shares. Check before tcon.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
7154deb026 first pass of the new group mapping code
J.F.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
01dfd59712 samba/source/nmbd/nmbd.c change remote_machine name to nmbd instead
of nmb so we write to same log file that
				was originally created as log.nmbd
samba/source/smbd/server.c	change remote_machine name to smbd instead
				of smb so we write to same log file that
				was originally created as log.smbd
samba/source/lib/interface.c	allow binding to all interface IP addresses
				even if on same subnet. This allows you to
				specify which IP's you want in interfaces
				line and use bind interfaces only
0001-01-01 00:00:00 +00:00
Jeremy Allison
c0517d6f4e Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
0001-01-01 00:00:00 +00:00
David O'Neill
b4c98196fc Changes from APPLIANCE_HEAD:
source/smbd/server.c
    source/nmbd/nmbd.c
        - Fixed a very subtle bug with signals. Seems that POSIX requires
          that the signal mask be inhereted. So, if you happen to kick off
          smbd/nmbd from code that has the mask set on SIGUSR1, you lose
          messages.
0001-01-01 00:00:00 +00:00
Jeremy Allison
48a3afcd47 Patch from Richard Bollinger for dead entries being left in connections tdb.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
8f3332a9ac passdb/secrets.c passdb/smbpassfile.c smbd/server.c : Actually *use* the code
written to transition from an old DOMAIN.MACHINE.MAC file to secrets.tdb.
printing/nt_printing.c: Fix case insensitive name lookups for driver files.
John - this should fix the Win9x/WinME problem correctly.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
349d58fb57 Fixed messaging so main smbd can get lib/message.c messages.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e041b144b2 Free talloc'ed memory from the main smbd. Patch from Rich Bollinger, Elliott Company
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
0b92d0838e 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
0001-01-01 00:00:00 +00:00
Jeremy Allison
580e2e044c Ignore SIGUSR2. Terminate nmbd if we have no interfaces.
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
f365950e7d allow "master" smbd to call message_init so it is not killed by messages
sent to it's PID

Jeremy or Andrew please check this out for other possible side effects.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e85a0fadd8 Remove lpq as root fix - do this in print_job_start instead
as part of print queue length processing.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6581066b93 Fixes to periodically scan printing.tdb in idle time and occasionally
on exit. Needed to fix printing.tdb from groving to 300Mb+ if being
driven by smbclient clients that never ask for status... (effective
DOS attack :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
2a34ee95f3 the first cut of the internal messaging system.
The motivation for this system is to replace the UDP message for
oplocks, but this commit only does the "set debug level" message.
0001-01-01 00:00:00 +00:00
Tim Potter
f026a897e9 Run main server loop with sys_select() instead of sys_select_intr(). The
main daemon was not catching sighup and reloading the service file.
0001-01-01 00:00:00 +00:00
Tim Potter
db5e6ad3a6 Call init_sec_ctx() instead of init_uid().
Delete OriginalDir stuff.
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
b28cc4163b 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b5ceab8102 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
70dcc791b4 clean up oplock capability code ready for Linux code 0001-01-01 00:00:00 +00:00
Shirish Kalele
6803d2574f 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
3e710f6602 formatting fix 0001-01-01 00:00:00 +00:00
Andrew Tridgell
92109d7b3c more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
0001-01-01 00:00:00 +00:00
Andrew Tridgell
d178c00aae more merging
it is now at the stage that winbindd can compile in the head branch,
but not link
0001-01-01 00:00:00 +00:00
Herb Lewis
6bf74da8b8 Fix for check_kernel_oplocks looking for the var directory
before it may need to be created.
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
ebb4f76550 This is reall Jeremy commiting as Herb at SGI labs. Fix
for "socket operation on non-socket" error in log.smb
on HEAD branch startup (server_fd not initialized to -1).
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
88ad00b82a added secrets.tdb and changed storage of trust account password to use
it
0001-01-01 00:00:00 +00:00
Jeremy Allison
148628b616 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
d7cd7c88fd moved trans2.h and nterr.h into includes.h with all our other includes 0001-01-01 00:00:00 +00:00
Andrew Tridgell
2fba24ef0e moved INSURE hook into util.c 0001-01-01 00:00:00 +00:00
Andrew Tridgell
bb9b3e03de trick to get full stack trace when using the free version of insure 0001-01-01 00:00:00 +00:00
Andrew Tridgell
2c2d95d77d - got rid of the "passive" option
- cleaned up the standard_sub_*() calls a lot
0001-01-01 00:00:00 +00:00
Andrew Tridgell
d870542c28 the changes to the main smb code
------------
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
Jeremy Allison
fbfe94a799 Roll back to using static MACHINE.SID after consultation with Andrew. This
code will be removed soon and a SID auto-generated from (probably) primary
hostname and never stored in a file will replace it.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
5937ab14d2 finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere

while doing so I discovered a few bugs!

1) the clientgen session retarget code if used from smbd or nmbd would
cause a crash as it called close_sockets() which closed our main
socket! fixed by removing close_sockets() completely - it is unnecessary

2) the caching in client_addr() and client_name() was bogus - it could
easily get fooled and give the wrong result. fixed.

3) the retarget could could recurse, allowing an easy denial of
service attack on nmbd. fixed.
0001-01-01 00:00:00 +00:00
Shirish Kalele
ca02d9f821 Cleaning up the warnings from configure.developer.
Found that Jeremy had already made some of the changes.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
e2557ae551 removed unused variable
J.F.
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
Jean-François Micouleau
b81dc7b7f8 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.
0001-01-01 00:00:00 +00:00
Tim Potter
3aad500c0f Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b62a1bd632 Added hash-based stat cache code from Ying Chen.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d120f22fef smbd/mangle.c
smbd/negprot.c: Tidyup of static initializers.
smbd/server.c: Fix -l option.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b563be824b 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
8976e26d46 simple mods to add msrpc pipe redirection. default behaviour: fall back
to using internal msrpc code in smbd.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
25b13f8b79 got rid of mem_man
yamd is much better, and doesn't require any source code changes
if you haven't seen yamd then take a look at
	http://www3.hmc.edu/~neldredge/yamd/
its excellent!
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
caa5052522 final part of "first" phase converting over to msrpc daemon architecture.
done a minimal amout of clean-up in the Makefile, removing unnecessary
modules from the link stage.  this is not complete, yet, and will
involve some changes, for example to smbd, to remove dependencies on
the password database API that shouldn't be there.  for example,
smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa
API.

this first implementation has minor problems with not reinstantiating
the same services as the caller.  the "homes" service is a good example.
0001-01-01 00:00:00 +00:00