Package: dash
Version: 0.5.11+git20200708+dd9ef66-2
Severity: normal

I get the following error:

$ ulimit -r
sh: 7: ulimit: Illegal option -r

but

$ ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        8192
coredump(blocks)     8388608
memory(kbytes)       unlimited
locked memory(kbytes) 2039132
process              63558
nofiles              1024
vmemory(kbytes)      unlimited
locks                unlimited
rtprio               0

The -r corresponds to the rtprio line, so should be supported if
this rtprio line makes sense.

I notice in miscbltin.c:

static const struct limits limits[] = {
[...]
#ifdef RLIMIT_AS
        { "vmemory(kbytes)",            RLIMIT_AS,      1024, 'v' },
#endif
#ifdef RLIMIT_LOCKS
        { "locks",                      RLIMIT_LOCKS,      1, 'w' },
#endif
#ifdef RLIMIT_RTPRIO
        { "rtprio",                     RLIMIT_RTPRIO,     1, 'r' },
#endif
        { (char *) 0,                   0,                 0,  '\0' }
};

but there is nothing for "r" in ulimitcmd():

        while ((optc = nextopt("HSa"
#ifdef RLIMIT_CPU
                               "t"
#endif
#ifdef RLIMIT_FSIZE
                               "f"
#endif
#ifdef RLIMIT_DATA
                               "d"
#endif
#ifdef RLIMIT_STACK
                               "s"
#endif
#ifdef RLIMIT_CORE
                               "c"
#endif
#ifdef RLIMIT_RSS
                               "m"
#endif
#ifdef RLIMIT_MEMLOCK
                               "l"
#endif
#ifdef RLIMIT_NPROC
                               "p"
#endif
#ifdef RLIMIT_NOFILE
                               "n"
#endif
#ifdef RLIMIT_AS
                               "v"
#endif
#ifdef RLIMIT_LOCKS
                               "w"
#endif
        )) != '\0')

I suppose that

#ifdef RLIMIT_RTPRIO
                               "r"
#endif

should be added at the end.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.9.0-2-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dash depends on:
ii  debconf [debconf-2.0]  1.5.74
ii  debianutils            4.11.2
ii  dpkg                   1.20.5
ii  libc6                  2.31-4

dash recommends no packages.

dash suggests no packages.

-- debconf information:
* dash/sh: true

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to