/*
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2017 Red Hat
Test for the MIT Kerberos localauth plugin
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
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/>.
*/
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdbool.h>
#include <nss.h>
#include <pwd.h>
#include <krb5/localauth_plugin.h>
#include "tests/cmocka/common_mock.h"
struct _nss_sss_getpwnam_r_test_data {
const char *name;
};
{
}
}
{
assert_int_equal(kerr, 0);
}
{
size_t c;
struct test_data {
} test_data[] = {
0},
/* second _nss_sss_getpwnam_r() is never called because the first one
* already returned an error */
/* second _nss_sss_getpwnam_r() is never called because the first one
* already returned an error */
};
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
}
}
}
{
size_t c;
char *lname;
struct test_data {
struct _nss_sss_getpwnam_r_test_data d;
} test_data[] = {
{ { 0, "my_name", NSS_STATUS_SUCCESS}, 0},
{ { 0, NULL, 0 } , 0}
};
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
if (kerr == 0) {
}
}
}
{
};
}