Re: ASDM and linux emulation?

2000-01-29 Thread Doug White

On Thu, 27 Jan 2000, F. Heinrichmeyer wrote:

 I would like to use an ASDM (backup software) with linux-emulation. I
 get
 the following in /var/log/messages:
 
 es-i2 /kernel: linux: syscall setresuid is obsoleted\
  or not implemented (pid=41052)
 Jan 27 13:12:42 es-i2 /kernel: pid 41052 (dsm), \
 uid 0: exited on signal 11 (core dumped)

What FreeBSD is this?  I've run the v3 client under linux mode without bad
syscalls (just that silly pathmunging stuff that I need to renew the fight
over).

I have a hacked linux.ko that lets dsmc backup what you think it will back
up, but the SCO version is a better fit.  I should try it on my
workstation. 

Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED] |  www.FreeBSD.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: ASDM and linux emulation?

2000-01-29 Thread Bjoern Groenvall


Fritz  Doug,

Doug White [EMAIL PROTECTED] writes:

 On Thu, 27 Jan 2000, F. Heinrichmeyer wrote:
 
  I would like to use an ASDM (backup software) with linux-emulation. I
  get
  the following in /var/log/messages:
  
  es-i2 /kernel: linux: syscall setresuid is obsoleted\
   or not implemented (pid=41052)
  Jan 27 13:12:42 es-i2 /kernel: pid 41052 (dsm), \
  uid 0: exited on signal 11 (core dumped)
 
 What FreeBSD is this?  I've run the v3 client under linux mode without bad
 syscalls (just that silly pathmunging stuff that I need to renew the fight
 over).

Perhaps you are running the backup as root while Fritz has a setuid
root program? In any case, please find attacked a patch that
implements setresuid. The patch is relative to 3.3 but should port
pretty easily to current.

Fritz, if this cures your problems, please drop me a note.

Cheers,
Björn

-- 
  _ _   ,___.  
Bjorn Gronvall (Björn Grönvall)/___/| 
Swedish Institute of Computer Science  |   ||
PO Box 1263, S-164 29 Kista, Sweden| Schroedingers ||
Email: [EMAIL PROTECTED], Phone +46 -8 633 15 25  |  Cat  |/
Cellular +46 -70 768 06 35, Fax +46 -8 751 72 30   `---' 

--- linux_misc.c2000/01/29 10:23:54 1.1
+++ linux_misc.c2000/01/29 11:40:28
@@ -797,6 +797,44 @@
 }
 
 int
+linux_setresuid(p, uap)
+   struct proc *p;
+   struct linux_setresuid_args *uap;
+{
+   struct setreuid_args bsd_args;
+
+   /* Allow setresuid iff the saved effective uid is left unchanged. */
+   if (uap-suid != -1  uap-suid != p-p_cred-p_svuid) {
+   printf("Linux-emul(%d): setresuid(%d, %d, %d) not supported\n",
+  p-p_pid, uap-ruid, uap-euid, uap-suid);
+   return ENOSYS;
+   }
+   bsd_args.ruid = uap-ruid;
+   bsd_args.euid = uap-euid;
+   /*  uap-suid is unchanged */
+   return setreuid(p, bsd_args);
+}
+
+int
+linux_setresgid(p, uap)
+   struct proc *p;
+   struct linux_setresgid_args *uap;
+{
+   struct setregid_args bsd_args;
+
+   /* Allow setresgid iff the saved effective gid is left unchanged. */
+   if (uap-sgid != -1  uap-sgid != p-p_cred-p_svgid) {
+   printf("Linux-emul(%d): setresgid(%d, %d, %d) not supported\n",
+  p-p_pid, uap-rgid, uap-egid, uap-sgid);
+   return ENOSYS;
+   }
+   bsd_args.rgid = uap-rgid;
+   bsd_args.egid = uap-egid;
+   /*  uap-sgid is unchanged */
+   return setregid(p, bsd_args);
+}
+
+int
 linux_msync(struct proc *p, struct linux_msync_args *args)
 {
struct msync_args bsd_args;
--- linux_proto.h   2000/01/29 10:28:59 1.1
+++ linux_proto.h   2000/01/29 11:08:53
@@ -402,6 +402,16 @@
int new_len;char new_len_[PAD_(int)];
int flags;  char flags_[PAD_(int)];
 };
+struct linux_setresuid_args {
+   int ruid;   char ruid_[PAD_(int)];
+   int euid;   char euid_[PAD_(int)];
+   int suid;   char suid_[PAD_(int)];
+};
+struct linux_setresgid_args {
+   int rgid;   char rgid_[PAD_(int)];
+   int egid;   char egid_[PAD_(int)];
+   int sgid;   char sgid_[PAD_(int)];
+};
 struct linux_rt_sigaction_args {
int sig;char sig_[PAD_(int)];
struct linux_new_sigaction *act;char act_[PAD_(struct 
linux_new_sigaction *)];
@@ -528,6 +538,8 @@
 intlinux_sched_setscheduler __P((struct proc *, struct 
linux_sched_setscheduler_args *));
 intlinux_sched_getscheduler __P((struct proc *, struct 
linux_sched_getscheduler_args *));
 intlinux_mremap __P((struct proc *, struct linux_mremap_args *));
+intlinux_setresuid __P((struct proc *, struct linux_setresuid_args *));
+intlinux_setresgid __P((struct proc *, struct linux_setresgid_args *));
 intlinux_rt_sigaction __P((struct proc *, struct linux_rt_sigaction_args *));
 intlinux_rt_sigprocmask __P((struct proc *, struct linux_rt_sigprocmask_args *));
 intlinux_chown __P((struct proc *, struct linux_chown_args *));
--- linux_syscall.h 2000/01/29 10:43:49 1.1
+++ linux_syscall.h 2000/01/29 11:09:30
@@ -162,7 +162,9 @@
 #defineLINUX_SYS_sched_rr_get_interval 161
 #defineLINUX_SYS_nanosleep 162
 #defineLINUX_SYS_linux_mremap  163
+#defineLINUX_SYS_linux_setresuid   164
 #defineLINUX_SYS_poll  168
+#defineLINUX_SYS_linux_setresgid   170
 #defineLINUX_SYS_linux_rt_sigaction174
 #defineLINUX_SYS_linux_rt_sigprocmask  175
 #defineLINUX_SYS_linux_chown   182
--- linux_sysent.c  2000/01/29 10:06:22 1.1
+++ linux_sysent.c  2000/01/29 11:06:51
@@ -178,13 +178,13 @@
{ 2, (sy_call_t *)sched_rr_get_interval },  /* 161 = 
sched_rr_get_interval */

ASDM and linux emulation?

2000-01-27 Thread F. Heinrichmeyer

I would like to use an ASDM (backup software) with linux-emulation. I
get
the following in /var/log/messages:

es-i2 /kernel: linux: syscall setresuid is obsoleted\
 or not implemented (pid=41052)
Jan 27 13:12:42 es-i2 /kernel: pid 41052 (dsm), \
uid 0: exited on signal 11 (core dumped)

as netscape and acroread work quite good i think the core dump is
related
to the former failure.

What is the problem with this syscall? This can be a show stopper for 
the server box ... I hate all this silly problems with mandrake-linux
etc.

-- 
Fritz Heinrichmeyer mailto:[EMAIL PROTECTED]
FernUniversitaet Hagen, LG ES, 58084 Hagen (Germany)
tel:+49 2331/987-1166 fax:987-355 http://www-es.fernuni-hagen.de/~jfh


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: ASDM and linux emulation?

2000-01-27 Thread Keith Stevenson

On Thu, Jan 27, 2000 at 01:39:38PM +0100, F. Heinrichmeyer wrote:
 I would like to use an ASDM (backup software) with linux-emulation. I
 get
 the following in /var/log/messages:

Have you tried the SCO client with the IBCS module loaded?  I've been using it
with great success for a while.

Regards,
--Keith Stevenson--

-- 
Keith Stevenson
System Programmer - Data Center Services - University of Louisville
[EMAIL PROTECTED]
PGP key fingerprint =  4B 29 A8 95 A8 82 EA A2  29 CE 68 DE FC EE B6 A0


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message