mount.cifs: use lock/unlock_mtab scheme from util-linux-ng mount prog
authorJeff Layton <jlayton@redhat.com>
Thu, 6 Nov 2008 20:07:07 +0000 (15:07 -0500)
committerJeff Layton <jlayton@redhat.com>
Thu, 6 Nov 2008 20:07:07 +0000 (15:07 -0500)
commit32695912dd3ed7c02da68209328d630c89d395ba
tree9fe8734a10f5a2a79980dff0578db12de0288530
parentdb26f7b7c49b6d4254ce5da7097e062b7dbd0409
mount.cifs: use lock/unlock_mtab scheme from util-linux-ng mount prog

The util-linux-ng sources have a good, but rather complex scheme for
locking the mtab before updating it. Mount helpers need to follow the
same scheme. Advisory locking only works if everyone is using the same
locking scheme.

Copy the routines we need from util-linux-ng into a separate source file
and then have mount.cifs and umount.cifs link in this object.

The long term goal is to have these routines in a separate helper
library (libmount). Mount helpers can then dynamically link in that lib.
Until that happens, this should serve as a suitable stopgap solution.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
source3/Makefile.in
source3/client/mount.cifs.c
source3/client/mount.h [new file with mode: 0644]
source3/client/mtab.c [new file with mode: 0644]
source3/client/umount.cifs.c