Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
salt.10418
improved-handling-of-ldap-group-id.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File improved-handling-of-ldap-group-id.patch of Package salt.10418
From f9c162e760b12c1df63bc1e315b9e92db923499c Mon Sep 17 00:00:00 2001 From: Raine Curtis <rcurtis@suse.com> Date: Mon, 9 Jul 2018 09:55:30 -0600 Subject: [PATCH] Improved handling of LDAP group id gid is casted to int, which should be the case. Otherwise an error is returned. --- salt/states/group.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/salt/states/group.py b/salt/states/group.py index 6a720757e8..acf775134c 100644 --- a/salt/states/group.py +++ b/salt/states/group.py @@ -72,9 +72,16 @@ def _changes(name, delusers = [salt.utils.win_functions.get_sam_name(user).lower() for user in delusers] change = {} + ret = {} if gid: - if lgrp['gid'] != gid: - change['gid'] = gid + try: + gid = int(gid) + if lgrp['gid'] != gid: + change['gid'] = gid + except (TypeError, ValueError): + ret['result'] = False + ret['comment'] = 'Invalid gid' + return ret if members: # -- if new member list if different than the current -- 2.19.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor