summaryrefslogtreecommitdiffstats
path: root/source3/client/smbumount.c
diff options
context:
space:
mode:
authorMichael Warfield <mhw@samba.org>1999-01-31 21:28:55 +0000
committerMichael Warfield <mhw@samba.org>1999-01-31 21:28:55 +0000
commitf5ac863e5a5c8e3ca584881214ebfbc6976b7d7f (patch)
treec53ad81e2db8aa9d292c747bf7afa5f51a531d3d /source3/client/smbumount.c
parent9b5043cb2f125c39eda1e986cfcce3b534dc3b43 (diff)
downloadsamba-f5ac863e5a5c8e3ca584881214ebfbc6976b7d7f.tar.gz
samba-f5ac863e5a5c8e3ca584881214ebfbc6976b7d7f.tar.xz
samba-f5ac863e5a5c8e3ca584881214ebfbc6976b7d7f.zip
Ok... Yet another round of fixes for smbmount and autofs.
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)
Diffstat (limited to 'source3/client/smbumount.c')
-rw-r--r--source3/client/smbumount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/client/smbumount.c b/source3/client/smbumount.c
index 5e072274c95..84188542e59 100644
--- a/source3/client/smbumount.c
+++ b/source3/client/smbumount.c
@@ -15,6 +15,14 @@
#include <linux/smb_mount.h>
#include <linux/smb_fs.h>
+/* This is a (hopefully) temporary hack due to the fact that
+ sizeof( uid_t ) != sizeof( __kernel_uid_t ) under glibc.
+ This may change in the future and smb.h may get fixed in the
+ future. In the mean time, it's ugly hack time - get over it.
+*/
+#undef SMB_IOC_GETMOUNTUID
+#define SMB_IOC_GETMOUNTUID _IOR('u', 1, __kernel_uid_t)
+
static char *progname;
static void