fix, evaluate results of syscalls and interrupt core dumping if errors are encountered

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
fix, allow mkdir(/tmp) and mkdir(/tmp/core) to return EEXIST

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
minor, add a chmod() after mkdir() to overcome umasks

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
minor, do not stop dumping if user name cannot be obtained

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
fix, PEBKAC, switch gid before uid, as CAP_SETGID might not be there after the uid switch

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
minor, hygiene, return user info relative to passed back pwr buffer in user_name() and user_home()

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
Merge branch 'code/hygiene'

* code/hygiene:
  minor, hygiene, return user info relative to passed back pwr buffer in user_name() and user_home()
  fix, PEBKAC, switch gid before uid, as CAP_SETGID might not be there after the uid switch
  minor, do not stop dumping if user name cannot be obtained
  minor, add a chmod() after mkdir() to overcome umasks
  fix, allow mkdir(/tmp) and mkdir(/tmp/core) to return EEXIST
  fix, evaluate results of syscalls and interrupt core dumping if errors are encountered