summaryrefslogtreecommitdiff
path: root/src/libnsss/nsss_unix_getspent.c
blob: f442a40cb64f63fff776c464dfbdc67ae07b0c52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <nsss/shadow-unix.h>
#include <nsss/nsss-unix.h>
#include "nsss-internal.h"
#include "nsss-unix-internal.h"

struct spwd *nsss_unix_getspent (void)
{
  if (!nsss_unix_shadow_maybe_start(&nsss_unix_shadow_here)) return 0 ;
  nsss_shadow_sa_here.len = 0 ;
  if (!nsss_unix_shadow_get(&nsss_unix_shadow_here, &nsss_shadow_here, &nsss_shadow_sa_here)) return 0 ;
  return &nsss_shadow_here ;
}