summaryrefslogtreecommitdiffstats
path: root/source3/client/smbmount.c
Commit message (Collapse)AuthorAgeFilesLines
* getpid() -> sys_getpid()Tim Potter2002-03-141-20/+20
| | | | (This used to be commit a3cea5e9ae3b53ecbc45e61a39cbce0ca1b916aa)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* One line fix to get smbmount working again.Andrew Bartlett2002-01-051-0/+3
| | | | | | | | This just turns of SPNGO becouse Win2k breaks if you attempt this and DOS errors at the same time. Andrew Bartlett (This used to be commit 2c09907b537147189e77810f586558be6004733b)
* Fix for extra capabilities from Urban Widmark <urban@teststation.com>.Jeremy Allison2001-12-191-25/+33
| | | | | Jeremy. (This used to be commit e943ace4f0fc70476668b0445acd91314a2e2a01)
* fix a bunch of places where we can double-free a cli structureAndrew Tridgell2001-11-281-6/+0
| | | | (This used to be commit e2ba2383c9f679c076749a8f4fccefc3559e37ec)
* Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter2001-11-261-5/+2
| | | | | | | | and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip); (This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077)
* Fixed compiler warnings and dyn_CONFIGFILE related breakage.Tim Potter2001-11-261-10/+9
| | | | (This used to be commit bf491d2aa2e99156b4e80bc9d89ab34cfb3c4cf4)
* Removed TimeInit() call from every client program (except for one placeTim Potter2001-11-231-2/+0
| | | | | | in smbd/process.c where the timezone is reinitialised. Was replaced with check for a static is_initialised boolean. (This used to be commit 8fc772c9e5770cd3a8857670214dcff033ebae32)
* Rename xmalloc, xmemdup, xstrdup to smb_$1 to avoid conflicts with theMartin Pool2001-11-201-4/+4
| | | | | versions defined by libreadline on SCO (!). (This used to be commit 32480d7aff21ce1c14991e242aaf8a4e14ec6f2a)
* Store some path names in global variables initialized to configureMartin Pool2001-11-191-8/+17
| | | | | default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)
* Remove xstrdup since it was added to lib/util.c. Caused compile failureJim McDonough2001-10-241-13/+0
| | | | (This used to be commit 43c384fa7854a9592ce5e5b67cb650c91ea09a76)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-1/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* smbmount fixes from Urban.Jeremy Allison2001-09-201-5/+21
| | | | | Jeremy. (This used to be commit 73ec9392396af6183bdf43b9f8ac0a6a0359a074)
* move to SAFE_FREE()Simo Sorce2001-09-171-7/+6
| | | | (This used to be commit 29db6ef7a7c4df51adf964c0aecb1164e4ab7dee)
* replaced stdio in many parts of samba with a XFILE. XFILE is a cut-downAndrew Tridgell2001-09-101-1/+1
| | | | | | | | | | replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor limit that we hit with nasty consequences on some systems I would eventually prefer us to have a configure test to see if we need to replace stdio, but for now this code needs to be tested widely so I'm enabling it by default. (This used to be commit 1af8bf34f1caa3e7ec312d8109c07d32a945a448)
* fixed handling of 139/445 in clientsAndrew Tridgell2001-08-241-2/+2
| | | | (This used to be commit 22b372f8a7996a19bebb8cdb411df999cffa32a4)
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-8/+8
| | | | | | can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
* The big character set handling changeover!Andrew Tridgell2001-07-041-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)
* a couple of minor merges from 2_2Andrew Tridgell2001-04-221-2/+4
| | | | (This used to be commit 67aa587eb2ee9044574ee212dfd7d52895f868c0)
* Patch from Mandrakesoft to ensure we close all files.John Terpstra2001-04-141-1/+3
| | | | (This used to be commit 8051406588987005f621cb095067d3628638d250)
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-4/+4
| | | | | Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
* Sync up Urbans changes from 2.2 into HEAD.Jeremy Allison2001-03-101-1/+4
| | | | | Jeremy. (This used to be commit d0fcd9144363acb4136af9d82f25980bd837d73c)
* Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.Jeremy Allison2001-03-091-55/+246
| | | | | | | | | | We were reading the endainness in the RPC header and then never propagating it to the internal parse_structs used to parse the data. Also removed the "align" argument to prs_init as it was *always* set to 4, and if needed can be set differently on a case by case basis. Now ready for AS/U testing when Herb gets it set up :-). Jeremy. (This used to be commit 0cd37c831d79a12a10e479bf4fa89ffe64c1292a)
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-2/+2
| | | | | | of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
* this looks like a big commit, but it isn't really :)Andrew Tridgell2000-01-071-5/+5
| | | | | | | | | 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. (This used to be commit b563be824b8c3141c49558eced7829b48d4ab26f)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-751/+445
| | | | (This used to be commit 453a822a76780063dff23526c35408866d0c0154)
* sys_select added one more argument (read, write selectors).Luke Leighton1999-12-011-1/+1
| | | | (This used to be commit e4d92ff9dfc51735e6932748f66a7c20b2c1cb6a)
* Got to the bottom of another weird one...Michael Warfield1999-02-181-1/+5
| | | | | | | | | | | Piping the output of smbmount back to autofs/automount was causing the automount process to hang. Reason was that automount was depending on the pipe to close to continue on, rather than detecting the child signal. This occured with debug enabled and the daemon process was not closing the stdout process. Disabling debuging avoids the problem. Debugging is turned off in the cvs repository and a warning placed over the debugging option. (This used to be commit 329ceaee49fa0175f78873433bd942865309f633)
* Added caching of user password if it was entered via getpass. We were alreadyMichael Warfield1999-02-141-1/+102
| | | | | | | | | | | | | | | | | | | caching the password if it came from the command line or from the environment. This completes the set and deals with the bloody nusance when reconnecting a connection after we have gone daemon... Grrr... Added code to clean up the mount point following a catastrophic failure during reconnect. The smbmount daemon was exiting but leaving the mount point in an unusable state. If smbmount must exit following a reconnect failure, we "unmount" the mount point and clean up mnttab. Currently, the unmount works, fixing some really ugly I/O errors and failure when trying to remount. The cleanup on mnttab still has problems. This is better than what it was and doesn't break anything that wasn't broken before, so I'm committing this in even with the mnttab problem. Will commit the fix to that when I figure out what is busted there... -mhw- (This used to be commit ad8389804cec6c6bf04601a1d7bb3fb7aa8c2274)
* Fixed a glibc glitch in smbumount.c and reenabled some debuggingMichael Warfield1999-02-131-1/+1
| | | | | in smbmount.c (This used to be commit 4b4a706213032ad49a0653e80721bac5f6284f90)
* Minor change to bring smbmount in the main branch in line with some bzeroMichael Warfield1999-02-011-3/+3
| | | | | to memset changes... (This used to be commit 1cb8fcb33bb9e930d8f3cba4cc1ba5aa880c5f8e)
* Ok... Yet another round of fixes for smbmount and autofs.Michael Warfield1999-01-311-18/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1) The earlier fix for the smbmount race conditions broke the PID registration with smbfs. That fix has been backed out and replaced by a signalling convention from the child smbmount process back to the parent telling the parent when it is safe to exit. 2) Fixing all of this uncovered a NASTY deadly embrace between smbmount, smbmnt, and autofs. This was caused by the setsid call in the daemon code. The smbmnt process no longer was registered as "magic" because it was no longer in the autofs process group. Many many kudos and thanks to H Peter Anvin for giving me the clue to solving this agravating puzzle. The setsid was moved down the where the child signals the parent and a warn left in its place in the daemonize code. 3) Fixed (actually worked around with a BUTT UGLY HACK) a problem with SMB_GET_MOUNTPID in smbumount.c. The smb_fs.h header file has the parameter to this ioctl defined as a uid_t. Unfortunately that's a 32 bit quantity under glibc and it's currently a 16 bit quantity in kernel space. Undefined the macro and redefined it with a parameter of __kernel_uid_t. That should keep us out of trouble till I can have someone fix smb_fs.h in the kernel sources... (This used to be commit c5608093e48ed7fd3b7a1e2a4b1af7e4e59fc2f9)
* Earlier fix for smbmount timing window was the wrong patch.Michael Warfield1998-11-301-9/+10
| | | | | | My bad... Earlier one was the patch from the CIFS conference that didn't work, this fixes... (This used to be commit 12739f0456e9f707a361bce2fa01b0baaae182d9)
* Fixed timing window created by daemonize function. Smbmount was going daemonMichael Warfield1998-11-131-7/+10
| | | | | | | | | before the mount was actually completed. This caused weird problems when used with autofs such as empty directories on first listing or files which would appear in "ls" but would return "no such file or directory" under "ls -l". Note to Volker: Initial attempt from CIFS conference didn't work. Had to move daemonize function inside of loop after ioctl. (This used to be commit 2f456be660b4bbf22c618b506062f812f35e368a)
* Fixed uid->vuid confusion in smbmount (hopefully).Jeremy Allison1998-09-301-2/+2
| | | | | Jeremy. (This used to be commit 60c2278e8c1941bca37f1dc000bd2c29a8c0c73b)
* Got very strict about the differences and uses ofJeremy Allison1998-09-291-10/+7
| | | | | | | | uid_t, gid_t and vuid. Added sys_getgroups() to get around the int * return problem. Set correct datatypes for all uid, gid and vuid variables. Jeremy. (This used to be commit e570db46fc3a78e499523fd342e9a34cebb18998)
* Two changes in this ball...Michael Warfield1998-09-281-0/+2
| | | | | | | | | | | | | 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. (This used to be commit 8a4730f61923577b0bd9e09ef1a00538f7dfb0de)
* bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell1998-08-311-5/+5
| | | | (This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
* This checking fixes the statcache bug that stopped NetBench from runningJeremy Allison1998-08-281-1/+1
| | | | | | | | | | | | | | | correctly. Added new parameter "stat cache size" - set to 50 by default. I now declare the statcache code officially "open" for business :-). It gets a hit rate of 97% with a NetBench run and seems to make using a case insensitive run as efficient as a case sensitive run. Also tidied up our sys_select usage - added a maxfd parameter and also added an implementation of select in terms of poll(), for systems where poll() is much faster. This is disabled by default. Jeremy. (This used to be commit 779b924ec1f6c81ff578d22295b20fece698d1fc)
* Changed a call to fflush(dbg) to dbgflush().Christopher R. Hertel1998-08-121-1/+1
| | | | (This used to be commit c626828471cf3d63dd74a4dd52b234f0aebd3fe5)
* As per a Andrew's message, I went through and removed the timestring()Christopher R. Hertel1998-07-311-1/+1
| | | | | | | | | | timestamps from several DEBUG messages. The timestamps are redundant now that DEBUG() provides them automatically. There are still a few more files to do, but I've got to get home for dinner. Chris -)----- (This used to be commit 60286ccecaa6028d687e6406755016455e3b3a26)
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-291-60/+2
| | | | (This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
* includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don'tJeremy Allison1998-05-121-2/+2
| | | | | | | | | | | have vsnprintf. locking_slow.c: slight tidy. make_smbcodepage.c: Use safe_strcpy instead of pstrcpy. nmbd_winsserver.c: Use pstrcpy instead of fstrcpy. smbmount.c: Fixed reported bug. util.c: Removed old fstrcpy/fstrcat functions. Jeremy. (This used to be commit f257d2e4bafd3944cca737699913a8d868279ca6)
* This is a security audit change of the main source.Jeremy Allison1998-05-121-23/+23
| | | | | | | | | | | | | | | | | | | It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
* changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1998-05-111-2/+2
| | | | | | | | everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes. (This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)
* This looks like a big change but really isn't.Jeremy Allison1998-04-251-4/+4
| | | | | | | | | | | | It is changing the global variables "myname" and "myworkgroup" to "global_myname" and "global_myworkgroup" respectively. This is to make it very explicit when we are messing with a global (don't ask - it makes the domain client code much clearer :-). Jeremy. (This used to be commit 866406bfe399cf757c8275093dacd5ce4843afa0)
* Adding the same changes to HEAD as were added to BRANCH_1_9_18.Jeremy Allison1998-03-191-25/+0
| | | | | | | | | | | | | | Changed smbpasswd to be client-server for a normal user, rather than accessing the private/smbpasswd file directly (it still accesses this file directly when run as root, so root can add users/change a users password without knowing the old password). A shakeout of this change is that smbpasswd can now be used to change a users password on a remote NT machine (yep - you heard that one right - we can now change a NT password from UNIX !!!!!). Jeremy. (This used to be commit 20770b6f1c25288e90d3e0d215afa7f0809ce124)
* another makeover of loadparm to support new stuff in swat andAndrew Tridgell1998-03-141-1/+1
| | | | | | | | | | | | | | | | | | | testparm. In particular I added: - ability to optionally save default values of all parameters when calling lp_load(). This can then be used to save only non-default parameters in lp_dump(). This makes the saved smb.conf (and viewed parameters in testparm) much shorter - ability to not load ipc share in lp_load() - separators in parm_table[] so parameters can be grouped logically. - flag to mark parameters that are local but which should be also viewed as global as far as parameters editing is concerned (This used to be commit f9af35da26e58fb0b644b5f0169f1c212230047a)
* Change the multibyte character set support so thatJeremy Allison1998-03-031-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kanji support is one case of multibyte character support, rather than being a specific case in single byte character support. This allows us to add Big5 Chinese support (code page 950) and Korean Hangul support (code page 949) at very little cost. Also allows us to easily add future multibyte code pages. Makefile: Added codepages 949, 950 as we now support more multibyte codepages. asyncdns.c: Fixed problem with child being re-spawned when parent killed. charcnv.c charset.c client.c clitar.c kanji.c kanji.h smb.h util.c loadparm.c: Generic multibyte codepage support (adding Big5 Chinese and Korean Hangul). nmbd.c: Fixed problem with child being re-spawned when parent killed. mangle.c: Modified str_checksum so that first 15 characters have more effect on outcome. This helps with short name mangling as most 'long' names are still shorter than 15 chars (bug was foobar_mng and foobar_sum would hash to the same value, with the modified code they hash differently. Jeremy. (This used to be commit 299016338cfb47f0c585875ef9b468121fcee97d)
* This is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-1/+1
| | | | | | | | This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)