public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: Danilo Godec <danilo.godec@agenda.si>
To: linux-msdos@vger.kernel.org
Subject: Running DOSEMU as user
Date: Tue, 02 Feb 2010 12:35:52 +0100	[thread overview]
Message-ID: <4B680E18.5040707@agenda.si> (raw)

Hi,

I administer an old system (dated back to 2002) running DOSEMU (1.0.0).
Multiple users connect to the machine with SSH / Telnet (over modem /
ISDN dial-in) and run DOS / Novell IPX based applications. The system
has worked so well that despite initial intentions to replace the system
with something more up-to-date, they're still using it and the number of
users increased. So much, that the old server is not coping anymore.

So now it's finally time to get new hardware and I intended to also use
a more up-to-date distribution and DOSEMU. I decided to use OpenSuSE
11.2, as I grown most comfortable with OpenSuSE. It comes with DOSEMU
1.4.0.1.

I have the system up and running on a test machine (which is a humble
desktop machine, but still more powerfull then the old server). I also
managed to get DOSEMU running with IPX (using 'direct' networking) and
those old Novell applications run too - but only if I run DOSEMU as
'root' (either directly or via 'sudo'). Now that is a bit of a problem,
because sometimes, people forget to logout or their connection is
interrupted - on the old system a login script would check whether
DOSEMU is already running for the user and it would terminate the
process. Of course, if I run all DOSEMU's as root, this is no longer
possible, so I'm trying to find a way to run DOSEMU as users, but with
all features.

I set the 'suid' bit to 'dosemu.bin':

  # ll /usr/bin/dosemu.bin
  -rwsr-xr-x 1 root root 1816368 Oct 24 10:19 /usr/bin/dosemu.bin

If I try to run DOSEMU as a user, I get this:

  > dosemu
  LOWRAM mmap: Invalid argument
  Segmentation fault

Actuaclly, this output is the same whether dosemu.bin has the suid bit
or not.

My 'dosemu.users':

> log_level= 1
> root c_all unrestricted
> all c_all unrestricted

I found several references to the 'LOWRAM mmap' error and changed my
'/proc/sys/vm/mmap_min_addr' to '0' - but it's still the same.

Running dosemu with 'strace', I get this (the last part of the output):

> mprotect(0xb6d40000, 7405568, PROT_READ|PROT_WRITE) = 0
> mprotect(0xb6d40000, 1114112, PROT_READ|PROT_WRITE) = 0
> mmap2(NULL, 1114112, PROT_READ|PROT_WRITE|PROT_EXEC,
> MAP_SHARED|MAP_FIXED, 5, 0) = -1 EACCES (Permission denied)
> mmap2(NULL, 1114112, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 5, 0)
> = -1 EACCES (Permission denied)
> mprotect(0xffffffff, 1114112, PROT_READ|PROT_WRITE|PROT_EXEC) = -1
> EINVAL (Invalid argument)
> munmap(0, 655360)                       = 0
> dup(2)                                  = 6
> fcntl64(6, F_GETFL)                     = 0x8002 (flags
> O_RDWR|O_LARGEFILE)
> fstat64(6, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xb753e000
> _llseek(6, 0, 0xbf913b00, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
> ---- removed some probably harmles 'locale' messages' ----
> write(6, "LOWRAM mmap: Invalid argument\n", 30LOWRAM mmap: Invalid
> argument
> ) = 30
> close(6)                                = 0
> munmap(0xb753e000, 4096)                = 0
> stat64("/home/danci/.dosemu/disclaimer", {st_mode=S_IFREG|0644,
> st_size=402, ...}) = 0
> munmap(0x100000, 65536)                 = 0
> mmap2(0x100000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
> MAP_SHARED|MAP_FIXED, 5, 0) = 0x100000
> mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> -1, 0) = 0xb6c40000
> write(4, "CONF: reserving 1088Kb at 0x1000"..., 71) = 71
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++

So... What am I doing wrong? What do I need to do to be able to run
DOSEMU as non-root user?

 Thanks, Danilo

PS: I sure hope this list is still 'alive'.


             reply	other threads:[~2010-02-02 11:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 11:35 Danilo Godec [this message]
2010-02-02 12:09 ` Running DOSEMU as user aja_by_steely_dan
2010-02-02 12:54 ` Reinhard Karcher
2010-02-02 21:26   ` Paul Crawford
2010-02-02 22:25     ` Reinhard Karcher
2010-02-03  8:29     ` Danilo Godec
2010-02-03  9:07       ` Reinhard Karcher
2010-02-03 12:28       ` Ivan Baldo
2010-02-03 12:02 ` Danilo Godec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B680E18.5040707@agenda.si \
    --to=danilo.godec@agenda.si \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox