[ovs-git] [openvswitch/ovs] eaf2aa: daemon-unix: Properly handle missing users or grou...

GitHub noreply at github.com
Mon May 16 21:14:24 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: eaf2aa9e23e0ae2a7380ca297f947f6e1219a555
      https://github.com/openvswitch/ovs/commit/eaf2aa9e23e0ae2a7380ca297f947f6e1219a555
  Author: Christian Ehrhardt <christian.ehrhardt at canonical.com>
  Date:   2016-05-16 (Mon, 16 May 2016)

  Changed paths:
    M lib/daemon-unix.c

  Log Message:
  -----------
  daemon-unix: Properly handle missing users or groups.

>From the manpages of getgrnam_r (getpwnam_r is similar):
"If no matching group record was found, these functions return 0 and
store NULL in *result."

The code checked only against errors, but non existing users didn't set
e != 0 therefore the code could try to set arbitrary uid/gid values.

Fixes: e91b927d lib/daemon: support --user option for all OVS daemon
Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list