summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
AgeCommit message (Collapse)AuthorFilesLines
2001-07-17Fixes from Jens-Uwe.Walther@force.de to make the -l option behaveJeremy Allison1-1/+1
consistently. Jeremy. (This used to be commit f591ca9f25c54d3cdd0b76df472411e44c95ea47)
2001-07-10added winbind_exclude_domain() so smbd can tell the winbind clientAndrew Tridgell1-0/+5
code not to do lookups for a particular domain. This allows winbind to operate on a Samba PDC (This used to be commit d472ee3a690fb6db03fd4536e4093a18fc37ddbb)
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-2/+2
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04The big character set handling changeover!Andrew Tridgell1-4/+0
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 debb471267960e56005a741817ebd227ecfc512a)
2001-06-25fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef ↵Andrew Tridgell1-3/+3
instead of a define (This used to be commit e2ecff419fdc0a0dc7551b33b377dc11061ef2a3)
2001-06-25- make the regresison test mode code build in by default. This shouldAndrew Tridgell1-11/+1
allow us to have test targets without special configure options - fixed make proto so that it actually does something (This used to be commit 55109a752578e9389d853cb27ec17c2114ecff77)
2001-06-22added the ability to test smbd safely as an ordinary user. The way it works isAndrew Tridgell1-0/+2
that libsmb/ creates a local tcp socket then launches smbd as a subprocess attached to that socket. smbd thinks it is being launched from inetd. to use it do the following: - compile with -DSMB_REGRESSION_TEST - run like this (also works with smbtorture etc) export SMBD_TEST=1 export LIBSMB_PROG=bin/smbd smbclient //server/share -Uuser%pass obviously you need to setup a smb.conf etc. Using --prefix to configure is useful. The aim of all this stuff is to add a decent set of regression tests to the build farm, so we know if smbd actually runs correctly on all the platforms, not just builds. We can run smbtorture, masktest, locktest etc, plus a bunch of smbclient scripts and any new tests we write. This doesn't help much with nmbd (at least not yet) but its a good start. (This used to be commit 7e8e6ae9a88c4d2587eb4e7f0501cd71bd36ebb2)
2001-05-25Added tdb_change_int_atomic() to allow atomic updates of a tdb int value.Jeremy Allison1-5/+3
Jeremy. (This used to be commit cf5015f15935605cf69078bc15251db61ddc48c7)
2001-05-08Patch from ackley@cs.unm.edu to clear server_fd/client_fd in root daemon to stopJeremy Allison1-0/+10
%I getpeername() failure. Jeremy. (This used to be commit 15584d30cd51650752fcbdd4f0dfc193fed18e5a)
2001-04-18merge from 2.2Andrew Tridgell1-1/+3
(This used to be commit f52a5014ee325f9d91f266f88eac51b6136a75b9)
2001-04-09Added set/get SD's on shares. Check before tcon.Jeremy Allison1-0/+4
Jeremy. (This used to be commit 036b1a8b09fe6a7cca83d631624145574acad7f2)
2001-04-08Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
2001-03-23first pass of the new group mapping codeJean-François Micouleau1-0/+5
J.F. (This used to be commit 7154deb026d53cb0cd503562174c3332a372be63)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-9/+0
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-02-15samba/source/nmbd/nmbd.c change remote_machine name to nmbd insteadHerb Lewis1-1/+1
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 (This used to be commit 01dfd59712f3730498784d7632da8fe0113d55b6)
2001-02-12Merge of JohnR's changes to appliance-head, JF's changes to 2.2,Jeremy Allison1-0/+17
updated the POSIX_ACL code to be in sync. Jeremy. (This used to be commit c0517d6f4e3079feca1309fd1ea7b21e83f0de02)
2001-01-25Changes from APPLIANCE_HEAD:David O'Neill1-0/+5
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. (This used to be commit b4c98196fc65e8b3bce928296e854987622eae78)
2001-01-08Patch from Richard Bollinger for dead entries being left in connections tdb.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 48a3afcd4716a456c3072bf41450b361e4379be8)
2000-11-27passdb/secrets.c passdb/smbpassfile.c smbd/server.c : Actually *use* the codeJeremy Allison1-0/+5
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. (This used to be commit 8f3332a9acf413ac5d12053ca5c52733a4e946cc)
2000-11-27Fixed messaging so main smbd can get lib/message.c messages.Jeremy Allison1-0/+8
Jeremy. (This used to be commit 349d58fb5758cebc5a8575f80103150b8cd0a080)
2000-11-22Free talloc'ed memory from the main smbd. Patch from Rich Bollinger, Elliott ↵Jeremy Allison1-0/+3
Company Jeremy. (This used to be commit e041b144b2c7c6c9fdd6cd20256a197876aaf353)
2000-11-13Large commit which restructures the local password storage API.Gerald Carter1-1/+1
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 0b92d0838ebdbe24f34f17e313ecbf61a0301389)
2000-10-12Ignore SIGUSR2. Terminate nmbd if we have no interfaces.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 580e2e044cfd1d011d9f28f0f49ef60ca6ba8d32)
2000-10-12allow "master" smbd to call message_init so it is not killed by messagesHerb Lewis1-4/+4
sent to it's PID Jeremy or Andrew please check this out for other possible side effects. (This used to be commit f365950e7dafa269ace647ae1cab6201f8ecf67d)
2000-10-11Remove lpq as root fix - do this in print_job_start insteadJeremy Allison1-4/+0
as part of print queue length processing. Jeremy. (This used to be commit e85a0fadd8dcf608822819f00f15569713518806)
2000-10-10Fixes to periodically scan printing.tdb in idle time and occasionallyJeremy Allison1-0/+4
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. (This used to be commit 6581066b93a674fadf6f9b92441428d2cc8b4a02)
2000-09-11the first cut of the internal messaging system.Andrew Tridgell1-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. (This used to be commit 2a34ee95f3929cff131db6c5a2b4820194c05b2d)
2000-07-24Run main server loop with sys_select() instead of sys_select_intr(). TheTim Potter1-2/+13
main daemon was not catching sighup and reloading the service file. (This used to be commit f026a897e9296a71fb5c4d5f6e1b4d3287689bde)
2000-06-23Call init_sec_ctx() instead of init_uid().Tim Potter1-9/+1
Delete OriginalDir stuff. (This used to be commit db5e6ad3a69a6fd744d8a22066587908470e3815)
2000-06-12totally rewrote the async signal, notification and oplock notificationAndrew Tridgell1-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! (This used to be commit 44766c39e0027c762bee8b33b12c621c109a3267)
2000-06-11Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell1-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. (This used to be commit b28cc4163bc2faaa80c5782fc02c8f03c410cdeb)
2000-06-10continued the split of the kernel level oplocks code into a moreAndrew Tridgell1-15/+8
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 b5ceab810292602ea9a81696c20a781c16b706c2)
2000-06-09clean up oplock capability code ready for Linux codeAndrew Tridgell1-6/+5
(This used to be commit 70dcc791b45ac64fc536ef449e4e6b53b2b68fd4)
2000-05-16The new msdfs implementation that uses symlinks to point to otherShirish Kalele1-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. (This used to be commit 6803d2574fab9e5931786d5c9aa5dc5867bb5f05)
2000-05-10formatting fixAndrew Tridgell1-1/+1
(This used to be commit 3e710f660253fe6fa5c0ed7435ec66a2ed908b28)
2000-05-10more merging voodooAndrew Tridgell1-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 (This used to be commit 92109d7b3c06f240452d39f669ecb8c9c86ab610)
2000-05-10more mergingAndrew Tridgell1-2/+3
it is now at the stage that winbindd can compile in the head branch, but not link (This used to be commit d178c00aae77710ae6ff20a7f54a30e3bd8232bb)
2000-05-09Fix for check_kernel_oplocks looking for the var directoryHerb Lewis1-2/+2
before it may need to be created. Jeremy. (This used to be commit 6bf74da8b84a22aaddb0fbb160f02621abba01ba)
2000-05-09This is reall Jeremy commiting as Herb at SGI labs. FixHerb Lewis1-1/+1
for "socket operation on non-socket" error in log.smb on HEAD branch startup (server_fd not initialized to -1). Jeremy. (This used to be commit ebb4f76550062b0ea2005a2b8842641a2c91f528)
2000-05-08added secrets.tdb and changed storage of trust account password to useAndrew Tridgell1-0/+2
it (This used to be commit 88ad00b82acc4636ab57dfe710af08ea85b82ff1)
2000-05-02Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison1-1/+1
of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
2000-04-25moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell1-1/+0
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
2000-04-24moved INSURE hook into util.cAndrew Tridgell1-23/+0
(This used to be commit 2fba24ef0e4cae64c5a179370c83d8bbf4e70bb8)
2000-04-23trick to get full stack trace when using the free version of insureAndrew Tridgell1-0/+24
(This used to be commit bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2)
2000-04-19- got rid of the "passive" optionAndrew Tridgell1-9/+1
- cleaned up the standard_sub_*() calls a lot (This used to be commit 2c2d95d77d3667eaa9252506a82b9054b0d0e01c)
2000-04-16the changes to the main smb codeAndrew Tridgell1-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. (This used to be commit d870542c2884510bd45fd5b54ff2157434d53f4c)
2000-04-12Roll back to using static MACHINE.SID after consultation with Andrew. ThisJeremy Allison1-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. (This used to be commit fbfe94a799cda7f728bc920d4f0655d4f537e3b6)
2000-04-11finally got sick of the "extern int Client" code and the stupidAndrew Tridgell1-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. (This used to be commit 5937ab14d222696e40a3fc6f0e6a536f2d7305d3)
2000-03-10Cleaning up the warnings from configure.developer.Shirish Kalele1-1/+3
Found that Jeremy had already made some of the changes. (This used to be commit ca02d9f8219265f80fe11236c8c146db1dbb1ae2)
2000-03-10removed unused variableJean-François Micouleau1-1/+0
J.F. (This used to be commit e2557ae5515ce30d0341ef7785cc4380266d4c94)