From 2e6e69d8f76841aedd9d93e0b7b89e52c9afe520 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 26 May 2009 00:45:54 +0000 Subject: [PATCH] Actually, just decided that you don't need vsys for this. --- fd_myntp.c | 138 ----------------------------------------------------- 1 file changed, 138 deletions(-) delete mode 100644 fd_myntp.c diff --git a/fd_myntp.c b/fd_myntp.c deleted file mode 100644 index 5c29c98..0000000 --- a/fd_myntp.c +++ /dev/null @@ -1,138 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include "fdpass.h" - -unsigned int rcvbuf = 16*1024*1024; -unsigned int arg_length = 128; -unsigned int mountflags = MS_NODEV | MS_NOSUID; - -FILE *logfd; - -void receive_argument(int control_channel_fd, char *source) { - int received; - received=recv(control_channel_fd, source, arg_length, 0); - if (received 1023) { - printf ("Got control_channel_fd = %d\n", control_channel_fd); - exit(1); - } - - receive_argument(control_channel_fd, source); - receive_argument(control_channel_fd, target); - receive_argument(control_channel_fd, filesystemtype); - receive_argument(control_channel_fd, data); - - mount_fd = receive_fd (control_channel_fd); - - if (mount_fd < 2) { - printf("mount_fd = %d\n", mount_fd); - exit(1); - } - - set_magic_fd(data, mount_fd); - - - check_source(source); - check_target(target); - check_fstype(filesystemtype); - - sprintf(slice_target,"/vservers/%s/%s", slice_name, target); - - fprintf(logfd, "Mount fd: %d Source: %s slice_target: %s fstype: %s mountflags: %d data: %s\n", mount_fd, source, slice_target, filesystemtype, mountflags, data); - - if (!mount(source, slice_target, filesystemtype, mountflags, data)) { - send_fd(control_channel_fd, mount_fd); - } - else { - printf ("Error executing mount\n"); - exit(1); - } - - close(logfd); - return 0; -} -- 2.43.0