]> Zhao Yanbai Git Server - minix.git/commit
Add "expected size" parameter to getsysinfo()
authorDavid van Moolenbroek <david@minix3.org>
Sun, 11 Dec 2011 21:30:35 +0000 (22:30 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Sun, 11 Dec 2011 21:34:14 +0000 (22:34 +0100)
commit6f374faca5c32553406a3cb4edb79fb0d9c89966
tree1d084fcd8bba70646076584f4e5fa5df37d63a99
parent9701e9dfd2a601aefcfa809015e8fd83ad65e1a4
Add "expected size" parameter to getsysinfo()

This patch provides basic protection against damage resulting from
differently compiled servers blindly copying tables to one another.
In every getsysinfo() call, the caller is provided with the expected
size of the requested data structure. The callee fails the call if
the expected size does not match the data structure's actual size.
17 files changed:
common/include/minix/com.h
common/include/minix/sysinfo.h
lib/libsys/getsysinfo.c
servers/avfs/misc.c
servers/avfs/param.h
servers/ds/store.c
servers/is/dmp_ds.c
servers/is/dmp_fs.c
servers/is/dmp_pm.c
servers/is/dmp_rs.c
servers/pm/main.c
servers/pm/misc.c
servers/pm/param.h
servers/procfs/tree.c
servers/rs/request.c
servers/vfs/misc.c
servers/vfs/param.h