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

#include <skalibs/buffer.h>
#include <skalibs/djbunix.h>
#include <nsss/nsss-unix.h>

int nsss_unix_start (nsss_unix_t *a, char const *path)
{
  int fd = open_readb(path) ;
  if (fd < 0) return 0 ;
  buffer_init(&a->b, &buffer_read, fd, a->buf, NSSS_UNIX_BUFSIZE) ;
  return 1 ;
}