about summary refs log tree commit diff
path: root/src/libnsss/nsss_switch_endpwent.c
blob: 501848ff680edd0bc456e0f8c21ec2a07c2eb745 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <pthread.h>

#include <nsss/pwd-switch.h>
#include "nsss-switch-internal.h"

void nsss_switch_endpwent (void)
{
  pthread_mutex_lock(&nsss_switch_enumerator_mutex) ;
  nsss_switch_pwd_end(&nsss_switch_enumerator, 0, 0) ;
  nsss_switch_end(&nsss_switch_enumerator, NSSS_SWITCH_PWD) ;
  pthread_mutex_unlock(&nsss_switch_enumerator_mutex) ;
}