4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina/*
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina Authors:
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina Pavel Březina <pbrezina@redhat.com>
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina Copyright (C) 2016 Red Hat
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina This program is free software; you can redistribute it and/or modify
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina it under the terms of the GNU General Public License as published by
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina the Free Software Foundation; either version 3 of the License, or
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina (at your option) any later version.
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina This program is distributed in the hope that it will be useful,
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina but WITHOUT ANY WARRANTY; without even the implied warranty of
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina GNU General Public License for more details.
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina You should have received a copy of the GNU General Public License
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina along with this program. If not, see <http://www.gnu.org/licenses/>.
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina*/
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina#include <talloc.h>
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina#include <ldb.h>
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina#include "util/util.h"
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina#include "confdb/confdb.h"
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina#include "responder/common/responder.h"
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek#include "responder/nss/nss_private.h"
4049b63f8c67ada17b453463b0451ca6be3d5de4Pavel Březina
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozekconst char *
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozeknss_get_pwfield(struct nss_ctx *nctx,
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek struct sss_domain_info *dom)
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek{
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek if (dom->pwfield != NULL) {
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek return dom->pwfield;
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek }
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek return nctx->pwfield;
c778c36c5170c2b9f1cf7a6e3b0811124534df03Jakub Hrozek}