Commit Graph

385 Commits

Author SHA1 Message Date
f3b882ba4a qa: add setsid test to newlib 2017-09-08 00:15:12 +02:00
3255a6aa47 devtools: improved newlib and mksh 2017-09-07 23:37:32 +02:00
e206015f7f libposix: add getpgid 2017-09-07 23:27:33 +02:00
1f3203e6d3 libposix: add rename 2017-09-07 23:25:34 +02:00
e3ff5b1004 libposix: add getpgrp; draft setsid, getsid and setpgid 2017-09-07 00:10:34 +02:00
c06dfdc834 newlib: add umask, chmod and fchmodat 2017-09-06 23:04:01 +02:00
e168dcb7fa libposix: add umask 2017-09-06 22:59:05 +02:00
61f0293e39 libposix: fake get/set functions for uid, gid, euid, egid, pgid, sid, reuid... 2017-09-05 23:53:40 +02:00
4f87ee109f Merge branch 'master' of https://bitbucket.org/tesio/jehanne 2017-09-05 23:09:59 +02:00
14edc758f4 libposix: add get/set functions for uid, gid, euid, egid, pgid, sid, reuid... 2017-09-05 00:15:37 +02:00
d9b9309561 devtools: qemu: use -device and -netdev options instead of -redir 2017-09-04 23:41:25 +02:00
b681752355 Merge branch 'master' of https://github.com/JehanneOS/jehanne 2017-09-04 00:10:37 +02:00
eb3f4fdf97 newlib: various improvements; mksh: improvements 2017-09-04 00:02:50 +02:00
4be2181f89 libposix: add readlink and readlinkat (both failing with EINVAL) 2017-09-03 23:46:18 +02:00
c5aaa72bbb libposix: add dup, dup2, getrusage, fstat and lstat 2017-09-03 17:51:44 +02:00
7f3297dada amd64/include/u.h: fix type of jmp_buf 2017-09-03 17:44:55 +02:00
4115f92ff6 libc: make times return -1 on io error 2017-09-03 17:43:02 +02:00
a97830e493 newlib: add qa test for setjmp/longjmp 2017-09-03 17:41:55 +02:00
575ed9afda mksh: fix submodule path 2017-09-01 01:29:31 +02:00
70623daadc coverity: try to disable coverity scan for newlib 2017-09-01 00:51:26 +02:00
82f581f76e devtools: start port of MirBSD Korn Shell 2017-09-01 00:47:01 +02:00
3cb5307da8 newlib: add chmod functions (just calling libposix) 2017-08-31 01:59:52 +02:00
0bc2e60c72 libposix: stub chown family (always returning 0)
I do not expect chown, fchownat and lchown to be much used in
UNIX softwares that we care to port.

We stub the functions in libposix so that we can refer them from
standard C libaries (such as newlib).

We will implement them (parsing /cfg/users to determinate uid and gid)
when it will be actually needed from a software ported to Jehanne.
2017-08-31 00:50:31 +02:00
6fd5c75ab3 qa/check: allow tests to SKIP themselves 2017-08-31 00:29:52 +02:00
60d71d421d devtools: cross-toolchain: terminate init.sh when fetch fails (thanks R41z) 2017-08-30 23:16:17 +02:00
3e533d234a cmds: port vt from 9front 2017-08-30 23:07:07 +02:00
e888e52502 qa: newlib: fix 102-files so that it works with disk based roots (runDisk.sh) 2017-08-30 00:15:50 +02:00
713eb8843f libc: simplify access; libposix: let access lie
There are a few issues with Plan 9's `access`:

- it has side effects: to test the actual access (that the file
  servers can allow or deny according to complex custom rules)
  it opens and then closes the file, allocating (and disposing) the fd
- it does not work on directories, since
  - they cannot be opened for writing, despite the fact that to
    create a file in a directory you must be granted write access on
    that directory
  - they cannot be opened for execution, despite the fact that to
    access a file in a directory you must be granted execution access
    on that directory

Despite the fact that `access` (even on UNIX) is a violation of the
"tell, don't ask" principle (the access could be forbidden just after
its successful return, making subsequent `open` fail anyway), this
fact smells of a little design error in the file interface.

So, right now we choose to let the libposix's `access` lie on directories:
it will always return 0 on AWRITE and AEXEC for them, accepting that
a successive create/mkdir may fail.

However, a cleaner file API and protocol should allow a simpler `access`
to be implemented for directories too.
2017-08-29 00:17:51 +02:00
1aaf8d3703 newlib: add access(2) 2017-08-28 23:04:32 +02:00
56287a4337 libc: better access on directories 2017-08-28 23:04:32 +02:00
fe173086f7 qa: improved newlib/103-files.c (testing access, mkdir, chdir and getcwd) 2017-08-28 23:04:31 +02:00
9bdbd9b09d qa: improve newlib/040-gettimeofday.c 2017-08-28 23:04:31 +02:00
59e881c04d libc: improve access(AWRITE) and access(AEXEC) on directories 2017-08-28 23:04:30 +02:00
b78613615d libposix: add access 2017-08-28 23:04:12 +02:00
386cb370a6 libposix: POSIX_gettimeofday fails without proper initialization 2017-08-25 23:43:14 +02:00
0185e3b4a1 newlib: initialize timeval and timezone reader for libposix 2017-08-25 23:41:40 +02:00
44fa703f84 qa: fix test newlib/040-gettimeofday.c 2017-08-25 23:33:10 +02:00
bd149a18f1 libposix: implement gettimeofday 2017-08-25 00:53:10 +02:00
2409419ba2 qa: fix 199-files-CLEAR.runner 2017-08-24 00:14:02 +02:00
476cf67dc3 newlib: fix open_translator 2017-08-24 00:13:35 +02:00
1e9c00b5d0 newlib: define mkdir, chdir and fchdir 2017-08-23 05:51:50 +02:00
6158d0e166 qa: newlib test for chdir and mkdir 2017-08-23 04:25:30 +02:00
bfb95a3d3e libposix: drafted chdir, fchdir and mkdir 2017-08-23 04:05:31 +02:00
4de95c9bc0 libposix: make AT_FDCWD value configurable 2017-08-23 02:57:41 +02:00
61c4849bd7 libposix: add POSIX_chmod and POSIX_fchmodat to posix.h 2017-08-23 02:05:34 +02:00
64d840d5ad newlib: handle POSIX_chmod and POSIX_fchmod in default_error_translator 2017-08-23 01:08:46 +02:00
4455658796 libposix: drafted chmod/fchmod; TODO: configurable AT_FDCWD 2017-08-23 01:05:54 +02:00
6a94e587a6 libposix: fix POSIX_open's DMDIR management; fix typo in POSIX_chmod 2017-08-22 22:42:38 +02:00
511bbd36af qa: newlib: better messages in 100-files 2017-08-22 02:45:49 +02:00
965d316ac4 libposix: return PosixENOTDIR according to O_DIRECTORY specification 2017-08-22 02:34:00 +02:00