summaryrefslogtreecommitdiff
path: root/source3/smbd/service.c
AgeCommit message (Collapse)AuthorFilesLines
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-1/+1
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04The big character set handling changeover!Andrew Tridgell1-3/+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-29Ensured all the system calls in msdfs.c go through the vfs layer.Jeremy Allison1-22/+4
Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy. (This used to be commit c24e6b41ea60ab4bac2fcd19da947851d6df3c7c)
2001-06-20added a close-share smbcontrol message that forcibly closes a share in smbd ↵Andrew Tridgell1-0/+2
(to allow unmount) (This used to be commit 15b17a80db605a55f667c95fb7e316877a441887)
2001-05-12Now we're doing the substituion in the lp_string code remove the erroneousJeremy Allison1-5/+0
debug 0 warning. Jeremy. (This used to be commit be7e1d0f2c078bd07c7087e1e36636dcd6d0a5d8)
2001-04-13Merge of Andrew's changes in 2.2.Jeremy Allison1-4/+4
Jeremy. (This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49)
2001-04-13As Andrew suggested, make smbrun return a fd for a deleted file which can thenJeremy Allison1-4/+4
be read. Jeremy. (This used to be commit e7d59d6de89a5fdd201e4b5c6072dab08b1519db)
2001-04-11Fix for core dump in security = share code with new share security db.Jeremy Allison1-22/+22
Jeremy. (This used to be commit 20b13bafdff2fd7be9219ed164e7fe91b597298d)
2001-04-09Added set/get SD's on shares. Check before tcon.Jeremy Allison1-0/+23
Jeremy. (This used to be commit 036b1a8b09fe6a7cca83d631624145574acad7f2)
2001-04-06Fix from Ed Boraas for not core dumping when out of connection structs.Jeremy Allison1-1/+0
Jeremy. (This used to be commit f50ea32dd0deb07c626c211caedd86dc1ccd5427)
2001-03-26Patch from Massimo Sivilotti <mass@tanner.com> to log remote machine/ip onJeremy Allison1-1/+2
connection fail. Jeremy. (This used to be commit 07cee46d1de1caaf6f9f1b6139dd21bcc5d67e8e)
2001-03-13Added ADMIN$ share as alias for IPC$ except no guest connect. AS/U wantsJeremy Allison1-3/+3
to do RPC calls down this treeid. Jeremy. (This used to be commit 83133bab0ed59e303a183fd91812165f08e88484)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-4/+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-01-24smbd/process.c: & type with 0xff for paranioa sake...Jeremy Allison1-30/+42
smbd/reply.c smbd/service.c: cause all "add home service" calls to go through a winbindd aware function. Jeremy. (This used to be commit a72d12e992e2755e925032aef1aa99be74bf6652)
2001-01-23only add the service name and client machine name to list of users namesGerald Carter1-2/+5
for a session when in share mode security --jerry (This used to be commit 22d6c2c163dd578365bff85ef95abfa59fe356ea)
2001-01-23include/vfs.h:Jeremy Allison1-6/+26
smbd/vfs-wrap.c: smbd/vfs.c: Added fchmod_acl and chmod_acl. lib/substitute.c: smbd/lanman.c: smbd/open.c: smbd/process.c: smbd/reply.c: smbd/service.c: Removed sessetup_user variable. Added current_user_info struct which conatins domain info etc. Added '%D' for client domain parameter. Jeremy. (This used to be commit 2844ec3d511680609d6794b8718001a1bda9e89f)
2001-01-17Changes from APPLIANCE_HEAD:David O'Neill1-1/+1
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 7b774b72c2857af9519012106714a9e2cb099da3)
2001-01-04Changes from APPLIANCE_HEAD:David O'Neill1-1/+1
source/Makefile.in - changes to ctags and etags rules that somehow got lost along the way. source/include/proto.h - make proto source/smbd/sec_ctx.c source/smbd/password.c - merge debugs for debugging user groups and NT token stuff. source/lib/util_str.c - capitalise domain name returned from parse_domain_user() source/nsswitch/wb_client.c - fix broken conditional in debug statement. source/include/rpc_secdes.h source/include/rpc_spoolss.h source/printing/nt_printing.c source/lib/util_seaccess.c - fix printer permission bugs related to ACE masks for printers. This adds mapping of generic access rights to object specific rights for NT printers. Still need to work out whether or not to ignore ACEs with certain flags set, though. See comments in util_seaccess.c:check_ace() for details. source/printing/nt_printing.c source/printing/printing.c - use PRINTER_ACCESS_ADMINISTER instead of JOB_ACCESS_ADMINISTER until we sort out printer/printjob permission stuff. (This used to be commit 1dba9c5cd1e6389734c648f6903abcb7c8d5b2f0)
2000-12-12Compile fix for new arg to create_nt_token()Tim Potter1-1/+3
(This used to be commit 806185ca8cc8d28f16745a1db9427f52eb8d22e4)
2000-11-17we don't need the separate lp_status() connection records any moreAndrew Tridgell1-12/+0
(This used to be commit 209e20365e562371aafafea301b4ffecc3d4c3ed)
2000-11-17fixed the problem with messages not getting throughAndrew Tridgell1-33/+27
the problem had nothing to do with being your own pid, it was instead a problem with IPC$ connections not being registered in the connections database and an incorrect test for -1 in the messaging code. These changes also mean that IPC$ shares now show up in smbstatus. That is probably a good thing. (This used to be commit 3575ad10985a18f897e38179ca69fa9a49a7ea02)
2000-11-06Added a VFS version return to init call. Allows smbd to fail an init ifJeremy Allison1-0/+2
versions don't match. Jeremy. (This used to be commit d0fbb4f5d999abade8930cc6fff231a2af6cccfb)
2000-10-13Fix to allow smbd to call winbindd if it is running for all group enumeration,Jeremy Allison1-10/+6
falling back to the UNIX calls on error. This should fix all problems with smbd enumerating all users in all groups in all trusted domains via winbindd. Also changed GETDC to query 1C name rather than 1b name as only the PDC registers 1b. Jeremy. (This used to be commit 5b0038a2afd8abbd6fd4a58f5477a40d1926d498)
2000-10-11Don't initialise groups twice.Tim Potter1-1/+0
(This used to be commit 15d7f16bdc2ff4f2ae82871eb9f318ba45cf4d1c)
2000-10-06Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison1-42/+2
a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy. (This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5)
2000-09-27Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison1-5/+5
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 f96625ec124adb6e110dc54632e006b3620a962b)
2000-08-31fixed "admin users" option with new security codeAndrew Tridgell1-0/+5
(This used to be commit b69c5de6bad9fad3aed1280e7d12fbfed276a16f)
2000-08-28Merge from appliance branch.Tim Potter1-0/+1
(This used to be commit 567b0095b1b8393b3b1e32533aa2860ab3dbfa47)
2000-08-03Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison1-65/+73
with the current user. This will allow se_access_check() to quickly do a SD check without having to translate uid/gid's to SIDs. Still needs work on pipe calls. Jeremy. (This used to be commit e28d01b744b3dbd33e0e54af4e7f426fa8c082b8)
2000-08-02Started to canonicalize our handling of uid -> sid code in order toJeremy Allison1-2/+2
get ready and fix se_access_check(). Added cannonical lookup_name(), lookup_sid(), uid_to_sid(), gid_to_sid() functions that look via winbind first the fall back on local lookup. All Samba should use these rather than trying to call winbindd code directly. Added NT_USER_TOKEN struct in user_struct, contains list of NT sids associated with this user. se_access_check() should use this (cached) value rather than attempting to do the same thing itself when given a uid/gid pair. More work needs to be done to preserve these things accross security context changes (especially with the tricky pipe problem) but I'm beginning to see how this will be done..... probably by registering a new vuid for an authenticated RPC pipe and not treating the pipe calls specially. More thoughts needed - but we're almost there... Jeremy. (This used to be commit 5e5cc6efe2e4687be59085f562caea1e2e05d0a8)
2000-07-25Fix for mounting a printer as a share. Not that there's anythingTim Potter1-0/+5
specifically wrong with this, but Samba is fooled by the client into thinking the printer is a file share. Files copied to the share gather dust in the spool directory and aren't printed. This patch has the effect of not allowing printers to be mounted as file shares. Not sure whether this is the correct solution or not. {Jeremy,JF,Tridge} please check! (This used to be commit dcf3249bb9fef2a05b376e9c8c1a0a7d602d8a2e)
2000-05-23Fixed bug where file access was allowed on IPC$ share.Jeremy Allison1-2/+2
Return correct error codes on invalid share name. Jeremy. (This used to be commit 420d6bc4809cef9d74354175d0fa956ab4e8ac3c)
2000-05-12added spool_io_printer_driver_info_level_6()Andrew Tridgell1-1/+1
thsi function and the associated header structure were autogenerated using a little awk based code geerator I wroe ths evening. I'll commit that next ... (This used to be commit 974813f0d4afb6c14ed27c48ab24b19932557f9f)
2000-05-10- changed smb_getpwnam() to use winbind style usernamesAndrew Tridgell1-1/+1
- finished ntdom -> winbind rename in head (This used to be commit ada483cb56453afc6df4ec4be18bfe5e943c7150)
2000-05-10more merging voodooAndrew Tridgell1-0/+4
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-04a minimal change to get appliance mode to work with winbinddAndrew Tridgell1-2/+2
we needed to accept usernames of the form DOMAIN/user, which means we needed to pass the domain to a getpwnam() like routine in certain critical spots. What I'd rather do is get rid of "char *user" everywhere and use the new userdom_struct, but that will have to wait a few days. (This used to be commit 8b7a10febead8be182e7d5b1d68259e31530b69c)
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-28Moved deletion of vfs handle into smbd/conn.c as it was being done tooJeremy Allison1-16/+0
soon in smbd/service.c (file operations were being done after the handle was closed). It looks cleaner in smbd/conn.c as it is part of the closing of a conn struct anyway. Jeremy. (This used to be commit 858eb53dc510d1b27c4f91045fa932a3ef546754)
2000-04-22don't copy a null groups listAndrew Tridgell1-2/+6
(This used to be commit d0fc1675df35e65488a19d7f5929792fba347b07)
2000-04-19- got rid of the "passive" optionAndrew Tridgell1-5/+5
- cleaned up the standard_sub_*() calls a lot (This used to be commit 2c2d95d77d3667eaa9252506a82b9054b0d0e01c)
2000-04-11finally got sick of the "extern int Client" code and the stupidAndrew Tridgell1-5/+3
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-02-03Mega-VFS merge. Yeah baby!Tim Potter1-1/+91
Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct. (This used to be commit 3aad500c0fb61232ed3431ff4b743b5d18ec852f)
1999-12-21first cut at using the tdb code for the connections structure, theAndrew Tridgell1-4/+4
SWAT status page and smbstatus. It made the code _much_ simpler, I wish we'd done a database module a long time ago! (This used to be commit 4951755413c11d4c5b9af4699a6e622056d52433)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-144/+118
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-12-12changed function name of get_home_dir() to get_unixhome_dir(), to stopLuke Leighton1-2/+2
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 054195df9b6187c663ede5cf4489499abbdc29fc)
1999-07-22Copy service name into vfs_connection_struct.Tim Potter1-0/+2
(This used to be commit 19242cd44e059d90e91f1c27bfb45899ce5de26a)
1999-06-29improving authentication code (tidyup).Luke Leighton1-2/+2
(This used to be commit ab1a6aa42db5217f025941fb5107436556bc23b7)
1999-06-13Moved code that changes the pw_passwd entry (i.e shadow password andTim Potter1-1/+1
weird unixware stuff) into _Get_Pwnam() to fix a memory allocation bug. Note that the Get_Pwnam() function now returns a const struct passwd * as a hint to other developers not to change entries in the struct passwd. (This used to be commit 36d7cb4ccc42268e8e6a7b783c945d1853624958)
1999-04-20Changed the way a VFS is initialised. The vfs_init() function isTim Potter1-4/+51
executed from the VFS object file and it returns a pointer to a vfs_ops structure. If any of the function pointers in vfs_ops are NULL, then they are replaced with the standard disk functions. This should allow disk-related VFS modules to be easily added. I've written an auditing VFS module which logs various calls (connect, disconnect, mkdir, rmdir, open and a few others) to syslog in a couple of pages of code. Thanks to tridge for various useful suggestions. (This used to be commit 346c78d7078d87bc95abc274f2bc66476aeee54c)
1999-04-05Disable VFS routines if no libdl available.Tim Potter1-0/+7
(This used to be commit cbfd8a8990b4d06d0c866274e7d28e4a5e384686)