summaryrefslogtreecommitdiff
path: root/usr/src/cmd/dfs.cmds
diff options
context:
space:
mode:
authorth199096 <none@none>2007-04-02 21:38:04 -0700
committerth199096 <none@none>2007-04-02 21:38:04 -0700
commita237e38e9161f0acd6451439d4a7dd597e66291d (patch)
treefd849269fae42c5f25794ca7599b55f212a82a4a /usr/src/cmd/dfs.cmds
parent3aa1cd26bc498bd7a8d002259dabfe984ccc90d1 (diff)
downloadillumos-gate-a237e38e9161f0acd6451439d4a7dd597e66291d.tar.gz
PSARC/2007/052 In-kernel Sharetab
6371468 /etc/dfs/sharetab should be a mntfs style file
Diffstat (limited to 'usr/src/cmd/dfs.cmds')
-rw-r--r--usr/src/cmd/dfs.cmds/sharemgr/commands.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/usr/src/cmd/dfs.cmds/sharemgr/commands.c b/usr/src/cmd/dfs.cmds/sharemgr/commands.c
index aa32cb962f..b32e7f13e2 100644
--- a/usr/src/cmd/dfs.cmds/sharemgr/commands.c
+++ b/usr/src/cmd/dfs.cmds/sharemgr/commands.c
@@ -3164,40 +3164,6 @@ sa_disable_group(sa_handle_t handle, int flags, int argc, char *argv[])
}
/*
- * check_sharetab()
- *
- * Checks to see if the /etc/dfs/sharetab file is stale (exists from
- * before the current boot). If it is, truncate it since nothing is
- * really shared.
- */
-
-static void
-check_sharetab()
-{
- int fd;
- struct utmpx *utmpxp;
- struct stat st;
-
- fd = open(SA_LEGACY_SHARETAB, O_RDWR);
- if (fd >= 0) {
- /*
- * Attempt to get a lock on the file. Whgen we get
- * one, then check to see if it is older than the boot
- * time. Truncate if older than boot.
- */
- (void) lockf(fd, F_LOCK, 0);
- if ((fstat(fd, &st) == 0) && /* does sharetab exist? */
- (utmpxp = getutxent()) != NULL && /* does utmpx exist? */
- (utmpxp->ut_xtime > st.st_mtime)) /* sharetab older? */
- (void) ftruncate(fd, 0);
-
- (void) lockf(fd, F_ULOCK, 0);
- (void) close(fd);
- endutxent();
- }
-}
-
-/*
* sa_start_group(flags, argc, argv)
*
* Implements the start command.
@@ -3252,8 +3218,6 @@ sa_start_group(sa_handle_t handle, int flags, int argc, char *argv[])
} else {
sa_group_t group;
- check_sharetab();
-
if (!all) {
while (optind < argc) {
group = sa_get_group(handle, argv[optind]);