summaryrefslogtreecommitdiffstats
path: root/source/smbd/server.c
Commit message (Collapse)AuthorAgeFilesLines
* the first cut of the internal messaging system.Andrew Tridgell2000-09-111-14/+4
| | | | | The motivation for this system is to replace the UDP message for oplocks, but this commit only does the "set debug level" message.
* Run main server loop with sys_select() instead of sys_select_intr(). TheTim Potter2000-07-241-2/+13
| | | | main daemon was not catching sighup and reloading the service file.
* Call init_sec_ctx() instead of init_uid().Tim Potter2000-06-231-9/+1
| | | | Delete OriginalDir stuff.
* totally rewrote the async signal, notification and oplock notificationAndrew Tridgell2000-06-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-111-1/+1
| | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour.
* continued the split of the kernel level oplocks code into a moreAndrew Tridgell2000-06-101-15/+8
| | | | | modular form. In this pass I added oplock_irix.c and added a "struct kernel_oplocks" that describes a kernel oplock implementation.
* clean up oplock capability code ready for Linux codeAndrew Tridgell2000-06-091-6/+5
|
* The new msdfs implementation that uses symlinks to point to otherShirish Kalele2000-05-161-11/+0
| | | | | | | | | | | | | | | | 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.
* formatting fixAndrew Tridgell2000-05-101-1/+1
|
* more merging voodooAndrew Tridgell2000-05-101-0/+2
| | | | | | 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
* more mergingAndrew Tridgell2000-05-101-2/+3
| | | | | it is now at the stage that winbindd can compile in the head branch, but not link
* Fix for check_kernel_oplocks looking for the var directoryHerb Lewis2000-05-091-2/+2
| | | | | before it may need to be created. Jeremy.
* This is reall Jeremy commiting as Herb at SGI labs. FixHerb Lewis2000-05-091-1/+1
| | | | | | for "socket operation on non-socket" error in log.smb on HEAD branch startup (server_fd not initialized to -1). Jeremy.
* added secrets.tdb and changed storage of trust account password to useAndrew Tridgell2000-05-081-0/+2
| | | | it
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-1/+1
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-251-1/+0
|
* moved INSURE hook into util.cAndrew Tridgell2000-04-241-23/+0
|
* trick to get full stack trace when using the free version of insureAndrew Tridgell2000-04-231-0/+24
|
* - got rid of the "passive" optionAndrew Tridgell2000-04-191-9/+1
| | | | - cleaned up the standard_sub_*() calls a lot
* the changes to the main smb codeAndrew Tridgell2000-04-161-0/+4
| | | | | | | | | | | | | | | | | | | | | ------------ 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.
* Roll back to using static MACHINE.SID after consultation with Andrew. ThisJeremy Allison2000-04-121-14/+1
| | | | | | code will be removed soon and a SID auto-generated from (probably) primary hostname and never stored in a file will replace it. Jeremy.
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-18/+33
| | | | | | | | | | | | | | | | 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.
* Cleaning up the warnings from configure.developer.Shirish Kalele2000-03-101-1/+3
| | | | Found that Jeremy had already made some of the changes.
* removed unused variableJean-François Micouleau2000-03-101-1/+0
| | | | J.F.
* dded Microsoft Dfs services.Shirish Kalele2000-03-081-2/+12
| | | | | | | | | | | | | | | | | * 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 ----------------------------------------------------------------------
* Jeremy can you check lib/util_unistr.c for codepages support ?Jean-François Micouleau2000-02-071-2/+5
| | | | | | | I added 2 UNICODE <-> ASCII functions which _don't_ honor codepage support. J.F.
* Mega-VFS merge. Yeah baby!Tim Potter2000-02-031-2/+2
| | | | | Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct.
* Added hash-based stat cache code from Ying Chen.Jeremy Allison2000-01-261-0/+1
| | | | Jeremy.
* smbd/mangle.cJeremy Allison2000-01-081-3/+12
| | | | | | smbd/negprot.c: Tidyup of static initializers. smbd/server.c: Fix -l option. Jeremy.
* this looks like a big commit, but it isn't really :)Andrew Tridgell2000-01-071-8/+2
| | | | | | | | 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.
* simple mods to add msrpc pipe redirection. default behaviour: fall backLuke Leighton2000-01-031-6/+19
| | | | to using internal msrpc code in smbd.
* got rid of mem_manAndrew Tridgell2000-01-031-2/+0
| | | | | | | 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!
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-176/+148
|
* final part of "first" phase converting over to msrpc daemon architecture.Luke Leighton1999-12-121-11/+0
| | | | | | | | | | | | 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.
* ABOUT TIME!!!!!!!!Luke Leighton1999-12-081-2/+0
| | | | | | | | | | | | | | | damn, this one is bad. started, at least two days ago, to add an authentication mechanism to the smbd<->msrpc redirector/relay, such that sufficient unix / nt information could be transferred across the unix socket to do a become_user() on the other side of the socket. it is necessary that the msrpc daemon inherit the same unix and nt credentials as the smbd process from which it was spawned, until such time as the msrpc daemon receives an authentication request of its own, whereupon the msrpc daemon is responsible for authenticating the new credentials and doing yet another become_user() etc sequence.
* the first independent msrpc daemon - lsarpcd.Luke Leighton1999-12-061-0/+12
| | | | | | | | | | | | | | | one horrible cut / paste job from smbd, plus a code split of shared components between the two. the job is not _yet_ complete, as i need to be able to do a become_user() call for security reasons. i picked lsarpcd first because you don't _need_ security on it (microsoft botched so badly on this one, it's not real. at least they fixed this in nt5 with restrictanonymous=0x2). fixing this involves sending the current smb and unix credentials down the unix pipe so that the daemon it eventually goes to can pick them up at the other end. i can't believe this all worked!!!
* sys_select added one more argument (read, write selectors).Luke Leighton1999-12-011-1/+1
|
* WARNING! MOVED rpc_server/srv_lsa_hnd.c TO lib/util_hnd.cLuke Leighton1999-11-241-1/+4
| | | | | | CVS UPDATE MAY ISSUE WARNING ABOUT lib/util_hnd.c MODIFICATION DATE BEING IN THE FUTURE. CVS CHECKOUT A NEW REPOSITORY MAY BE SAFER.
* rewrote policy handle code to be generic (it's needed for client-side too)Luke Leighton1999-11-241-1/+1
| | | | attempted to fix regsetsec command
* set "key does not exist" response to reg_query_val() (win32 status codeLuke Leighton1999-11-181-0/+6
| | | | of 0x2). [p.s. getting REALLY bored of this nt5rc2->samba domain stuff].
* David van Geyn spotted that ulong is not defined on FREEBSD, not supposedLuke Leighton1999-10-051-1/+1
| | | | to use ulong use uint32 instead.
* #defines for port 445 to SMB_PORT2Luke Leighton1999-09-151-4/+4
|
* oops, port 455 instead of 445Luke Leighton1999-09-101-1/+1
|
* bertl <bs@niggard.org> patch for making samba listen on port 445, just likeLuke Leighton1999-09-081-28/+48
| | | | nt 5 does. cool!
* Jean-Francois Micouleau's rewritten DFS patch, originally written byLuke Leighton1999-07-121-0/+3
| | | | | Nigel Williams. despite the data format being *exactly* the same as NT's, this still doesn't work yet. more work needed.
* rpc_parse/parse_misc.c : defined a new BUFFER5 structJean-François Micouleau1999-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | 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
* Ken McDonell from SGI was interested in adding some profilingAndrew Tridgell1999-04-011-1/+8
| | | | | | | | | | | | 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.
* reload_services needs to be called prior to init_files but afterLuke Leighton1999-02-081-4/+4
| | | | get_myname.
* initialise my name (used in %h) prior to loading smb.conf files.Luke Leighton1999-02-031-26/+15
|
* rpc_samr.h parse_samr.c srv_samr.c :Luke Leighton1998-12-011-1/+1
| | | | | | | | | | samr_query_aliasmembers (cool!) util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c : pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5) to obtain member and pdc sids.