#
# SSSD integration test - operations on UNIX user and group database
#
# Copyright (c) 2016 Red Hat, Inc.
#
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import os
import tempfile
import pytest
import ent
backup_envvar_file("NSS_WRAPPER_PASSWD")
return pwd_ops
backup_envvar_file("NSS_WRAPPER_GROUP")
return grp_ops
return grp_ops
"""
A naive implementation of operations as a basis for user or group
operations. Uses rename to (hopefully) trigger the same fs-level
notifications as shadow-utils would.
"""
return num
return contents
"""
A naive implementation of user operations
"""
pwd_fmt = "{name}:{passwd}:{uid}:{gid}:{gecos}:{homedir}:{shell}\n"
"""
A naive implementation of group operations
"""
grp_fmt = "{name}:{passwd}:{gid}:{member_list}\n"