#include <Xm/PushBG.h>
#include <Xm/RowColumn.h>
#include <Xm/CascadeBG.h>
+#include <Xm/LabelG.h>
#include <Xm/SeparatoG.h>
#include <Xm/VirtKeys.h>
# define ROOTINO UFSROOTINO
# endif /* sco */
#else
-# if defined(linux)
+# if defined(linux) || defined(CSRG_BASED)
# define ROOTINO 2
# endif
# include <sys/param.h>
if (lstat (to, &s2) >= 0) /* <to> exists */
{
if ((stat (to, &s3) >= 0) &&
-#if defined(__hp_osf) || (__ultrix) || defined(__osf__) || defined(linux)
+#if defined(__hp_osf) || (__ultrix) || defined(__osf__) || defined(linux) || \
+ defined(CSRG_BASED)
(((s3.st_mode & S_IFMT) == S_IFDIR) /* if is a directory */
|| ((s3.st_mode & S_IFMT) == S_IFSOCK)) ) /* or a net special */
#else
#include "Filter.h"
#include "Help.h"
+char **DtDtsDataTypeNames(void);
static char * FILE_FILTER = "FileFilter";
if (access_priv == -1 && geteuid() != root_user)
{
#else
-# if defined(__hp_osf) || defined(__ultrix) || defined(__osf__) || defined(linux)
+# if defined(__hp_osf) || defined(__ultrix) || defined(__osf__) || defined(linux) || defined(CSRG_BASED)
setreuid(geteuid(),-1);
if (access ((char *) path, R_OK) == -1)
{
#ifdef __osf__
oldSig = signal(SIGCHLD, sigchld_handler);
#else
- oldSig = signal(SIGCLD, SIG_DFL);
+ oldSig = signal(SIGCHLD, SIG_DFL);
#endif /* __osf__ */
find_rec->popenId = findpopen(command, "r",&(find_rec->childpid));
- signal (SIGCLD, oldSig);
+ signal (SIGCHLD, oldSig);
if (find_rec->popenId == NULL)
{
/* error handling follows, none for now */
;
#else
- (void) signal (SIGCLD, SIG_IGN);
+ (void) signal (SIGCHLD, SIG_IGN);
#endif /* __osf__ */
XtSetLanguageProc( NULL, NULL, NULL );
/* prepare to catch the command termination */
- oldSig = signal (SIGCLD, SIG_DFL);
+ oldSig = signal (SIGCHLD, SIG_DFL);
/* fork a process to run command */
if ((child = fork ()) < 0) /* fork failed */
{
- (void) signal (SIGCLD, oldSig);
+ (void) signal (SIGCHLD, oldSig);
return (-1);
}
wait_return = wait (&exit_value);
} while (wait_return != child);
- (void) signal (SIGCLD, oldSig); /* child stopped or terminated */
+ (void) signal (SIGCHLD, oldSig); /* child stopped or terminated */
return (exit_value); /* if exit_value == 0 then success */
}
#include "Main.h"
#include "SharedProcs.h"
+extern char *pathcollapse();
+
/* Defines */
#define RW_ALL S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH
/******** Public Function Declarations ********/
+extern String _DtStripSpaces(
+ String string) ;
+
extern char * _DtPName(
register char *name) ;
extern char * _DtFollowLink(
#include <dirent.h>
#include <unistd.h>
#include <string.h>
+#if defined(CSRG_BASED)
+#include <sys/param.h>
+#include <sys/mount.h>
+#else
#include <ustat.h>
+#endif
#include <Xm/RowColumn.h>
#include <Xm/CascadeB.h>
char *parentdir,
char *destinationPath)
{
+#if defined(CSRG_BASED)
+ struct statfs statbuf;
+#else
struct stat statbuf;
+#endif
char fname[1024];
+#if defined(CSRG_BASED)
+ if (statfs(parentdir,&statbuf) < 0) /* does not exist */
+#else
if (lstat(parentdir,&statbuf) < 0) /* does not exist */
+#endif
return -1;
/* check if we are root */
if (getuid() == 0)
{
/* if NFS, need to check if server trusts root */
+#if defined(CSRG_BASED)
+ if (!strcmp(statbuf.f_fstypename, "nfs")) /* Root user and nfs */
+#else
if (FileSysType(statbuf.st_dev) < 0) /* Root user and nfs */
+#endif
{
char *tmpfile;
tmpfile = tempnam(parentdir,"quang");
return 0;
}
+#if !defined(CSRG_BASED)
static int
FileSysType(
int dev)
return -2;
return u1.f_tinode;
}
+#endif
static int
RestoreObject(
# define ROOTINO UFSROOTINO
#endif
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
# include <sys/param.h>
# define ROOTINO 2
#endif
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
+#include <sys/mount.h>
#include <pwd.h>
#include <fcntl.h>
+#if !defined(CSRG_BASED)
#include <ustat.h>
+#endif
#include <dirent.h>
return ;
} /* end ImageInitialize */
+#if !defined(CSRG_BASED)
static int
CopyFileSysType(
int dev)
return -2;
return u1.f_tinode;
}
+#endif
static int
CopyCheckDeletePermissionRecur(
char *parentdir,
char *destinationPath)
{
+#if defined(CSRG_BASED)
+ struct statfs statbuf;
+#else
struct stat statbuf;
+#endif
char fname[1024];
+#if defined(CSRG_BASED)
+ if (statfs(parentdir,&statbuf) < 0) /* does not exist */
+#else
if (lstat(parentdir,&statbuf) < 0) /* does not exist */
+#endif
return -1;
/* check if we are root */
if (getuid() == 0)
{
/* if NFS, need to check if server trusts root */
+#if defined(CSRG_BASED)
+ if (!strcmp(statbuf.f_fstypename, "nfs")) /* Root user and nfs */
+#else
if (CopyFileSysType(statbuf.st_dev) < 0) /* Root user and nfs */
+#endif
{
char *tmpfile;
tmpfile = tempnam(parentdir,"quang");