[lxc-devel] [lxc/lxc] 8d9f63: lxc_user_nic: add a check to make sure caller owns...

GitHub noreply at github.com
Tue Nov 19 22:27:51 UTC 2013


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 8d9f636daf77f1a551f0c25e1270ab32e5b21ea4
      https://github.com/lxc/lxc/commit/8d9f636daf77f1a551f0c25e1270ab32e5b21ea4
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: add a check to make sure caller owns target netns

Temporarily set our euid back to the calling ruid, so that the
access(2) check can succeed based on the euid being the userns
creator.

Also switch from atoi to strtol

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 95dfc8bd4bcac4261e1463f3fc30f984eb2f477a
      https://github.com/lxc/lxc/commit/95dfc8bd4bcac4261e1463f3fc30f984eb2f477a
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: don't pass unused arg to get_username()

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: d56e223681dfd10e59b23261cabd9084aec786fc
      https://github.com/lxc/lxc/commit/d56e223681dfd10e59b23261cabd9084aec786fc
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: report strerror(errno)

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 78f97d4c4f503854127016d9125c298aefea25a2
      https://github.com/lxc/lxc/commit/78f97d4c4f503854127016d9125c298aefea25a2
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: only exit from main and usage

Everywhere else return an error code instead.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: c8f73ce205aea218d4deb8e89e06ec6dc1abcc6b
      https://github.com/lxc/lxc/commit/c8f73ce205aea218d4deb8e89e06ec6dc1abcc6b
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: report failing filename in open_and_lock error cases

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 8c81de199c300377eb994d9650c6724b5247c869
      https://github.com/lxc/lxc/commit/8c81de199c300377eb994d9650c6724b5247c869
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: fix get_allotted description.

get_allotted doesn't get the list of nic names, only the # of nics
allowed to the user.  We check the db_file later for existing
number of nics.

Also close the conf file on success, and print filename and errno
if we failed to open conf file.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 552a7d059549d2069f02931eed0487579ef9ddda
      https://github.com/lxc/lxc/commit/552a7d059549d2069f02931eed0487579ef9ddda
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: make all fns static for consistency

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 82160e6f087c8bedefc6c67548c73313fa75be1b
      https://github.com/lxc/lxc/commit/82160e6f087c8bedefc6c67548c73313fa75be1b
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc_user_nic: initialize cnic to NULL to please compiler

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 03c2eb1563fadf9a61632e4f8517154fefe55efb
      https://github.com/lxc/lxc/commit/03c2eb1563fadf9a61632e4f8517154fefe55efb
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-11-19 (Tue, 19 Nov 2013)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc-user-nic: improve cull_entries

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/ad40563e9022...03c2eb1563fa


More information about the lxc-devel mailing list