fix newusers when nss provides subids

Closes #331

1. drop 'has_any_range' nss method as it is not useful

2. do not try to create a subid range in newusers when using nss for
   subids, since that's not possible.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
(cherry picked from commit 88a434adbdcf4a8640793fd58bcd2ba77598349d)
This commit is contained in:
Serge Hallyn
2021-05-16 21:59:14 -05:00
parent 0fe42f571c
commit 9d169ffc41
5 changed files with 24 additions and 47 deletions

View File

@@ -269,18 +269,6 @@ extern void nss_init(char *nsswitch_path);
extern bool nss_is_initialized();
struct subid_nss_ops {
/*
* nss_has_any_range: does a user own any subid range
*
* @owner: username
* @idtype: subuid or subgid
* @result: true if a subid allocation was found for @owner
*
* returns success if the module was able to determine an answer (true or false),
* else an error status.
*/
enum subid_status (*has_any_range)(const char *owner, enum subid_type idtype, bool *result);
/*
* nss_has_range: does a user own a given subid range
*