summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-10 17:24:04 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-10 17:24:04 +0000
commitc9a58ceb7c07774944930105ace2f042be7b5f53 (patch)
tree554a1014d8835b5d8344dc9315c0572e75e633e5 /src
parenteed713a7a54262c9df8fa139db7d75112115d63f (diff)
downloadnsss-c9a58ceb7c07774944930105ace2f042be7b5f53.tar.xz
Adapt to skalibs-2.11.0.0, prepare for 0.1.0.2
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/nsss/nsss-switch.h32
-rw-r--r--src/libnsss/nsss-switch-internal.h8
-rw-r--r--src/libnsss/nsss_switch_grp_end.c2
-rw-r--r--src/libnsss/nsss_switch_grp_get.c2
-rw-r--r--src/libnsss/nsss_switch_grp_getbygid.c2
-rw-r--r--src/libnsss/nsss_switch_grp_getbyname.c2
-rw-r--r--src/libnsss/nsss_switch_grp_getlist.c4
-rw-r--r--src/libnsss/nsss_switch_grp_read.c2
-rw-r--r--src/libnsss/nsss_switch_grp_rewind.c2
-rw-r--r--src/libnsss/nsss_switch_op.c2
-rw-r--r--src/libnsss/nsss_switch_pwd_end.c2
-rw-r--r--src/libnsss/nsss_switch_pwd_get.c2
-rw-r--r--src/libnsss/nsss_switch_pwd_getbyname.c2
-rw-r--r--src/libnsss/nsss_switch_pwd_getbyuid.c2
-rw-r--r--src/libnsss/nsss_switch_pwd_read.c2
-rw-r--r--src/libnsss/nsss_switch_pwd_rewind.c2
-rw-r--r--src/libnsss/nsss_switch_shadow_end.c2
-rw-r--r--src/libnsss/nsss_switch_shadow_get.c2
-rw-r--r--src/libnsss/nsss_switch_shadow_getbyname.c2
-rw-r--r--src/libnsss/nsss_switch_shadow_read.c2
-rw-r--r--src/libnsss/nsss_switch_shadow_rewind.c2
-rw-r--r--src/libnsss/nsss_switch_start.c4
-rw-r--r--src/nsssd/nsssd-nslcd.c42
-rw-r--r--src/nsssd/nsssd_main.c8
-rw-r--r--src/tests/test-switch.c2
25 files changed, 68 insertions, 68 deletions
diff --git a/src/include/nsss/nsss-switch.h b/src/include/nsss/nsss-switch.h
index 1f40f7c..e0ce2dc 100644
--- a/src/include/nsss/nsss-switch.h
+++ b/src/include/nsss/nsss-switch.h
@@ -35,7 +35,7 @@ struct nsss_switch_s
#define NSSS_SWITCH_GRP 1
#define NSSS_SWITCH_SHADOW 2
-extern int nsss_switch_start (nsss_switch_t *, unsigned int, char const *, tain_t const *, tain_t *) ;
+extern int nsss_switch_start (nsss_switch_t *, unsigned int, char const *, tain const *, tain *) ;
#define nsss_switch_start_g(a, what, s, deadline) nsss_switch_start(a, what, s, (deadline), &STAMP)
extern void nsss_switch_end (nsss_switch_t *, unsigned int) ;
@@ -48,15 +48,15 @@ extern void nsss_switch_end (nsss_switch_t *, unsigned int) ;
#define NSSS_SWITCH_PWD_GETBYNAME '\003'
#define NSSS_SWITCH_PWD_GETBYUID '\004'
-extern int nsss_switch_pwd_end (nsss_switch_t *, tain_t const *, tain_t *) ;
+extern int nsss_switch_pwd_end (nsss_switch_t *, tain const *, tain *) ;
#define nsss_switch_pwd_end_g(a, deadline) nsss_switch_pwd_end(a, (deadline), &STAMP)
-extern int nsss_switch_pwd_rewind (nsss_switch_t *, tain_t const *, tain_t *) ;
+extern int nsss_switch_pwd_rewind (nsss_switch_t *, tain const *, tain *) ;
#define nsss_switch_pwd_rewind_g(a, deadline) nsss_switch_pwd_rewind(a, (deadline), &STAMP)
-extern int nsss_switch_pwd_get (nsss_switch_t *, struct passwd *, stralloc *, tain_t const *, tain_t *) ;
+extern int nsss_switch_pwd_get (nsss_switch_t *, struct passwd *, stralloc *, tain const *, tain *) ;
#define nsss_switch_pwd_get_g(a, b, sa, deadline) nsss_switch_pwd_get(a, b, sa, (deadline), &STAMP)
-extern int nsss_switch_pwd_getbyname (nsss_switch_t *, struct passwd *, stralloc *, char const *, tain_t const *, tain_t *) ;
+extern int nsss_switch_pwd_getbyname (nsss_switch_t *, struct passwd *, stralloc *, char const *, tain const *, tain *) ;
#define nsss_switch_pwd_getbyname_g(a, b, sa, name, deadline) nsss_switch_pwd_getbyname(a, b, sa, name, (deadline), &STAMP)
-extern int nsss_switch_pwd_getbyuid (nsss_switch_t *, struct passwd *, stralloc *, uid_t, tain_t const *, tain_t *) ;
+extern int nsss_switch_pwd_getbyuid (nsss_switch_t *, struct passwd *, stralloc *, uid_t, tain const *, tain *) ;
#define nsss_switch_pwd_getbyuid_g(a, b, sa, u, deadline) nsss_switch_pwd_getbyuid(a, b, sa, u, (deadline), &STAMP)
@@ -69,17 +69,17 @@ extern int nsss_switch_pwd_getbyuid (nsss_switch_t *, struct passwd *, stralloc
#define NSSS_SWITCH_GRP_GETBYGID '\024'
#define NSSS_SWITCH_GRP_GETLIST '\025'
-extern int nsss_switch_grp_end (nsss_switch_t *, tain_t const *, tain_t *) ;
+extern int nsss_switch_grp_end (nsss_switch_t *, tain const *, tain *) ;
#define nsss_switch_grp_end_g(a, deadline) nsss_switch_grp_end(a, (deadline), &STAMP)
-extern int nsss_switch_grp_rewind (nsss_switch_t *, tain_t const *, tain_t *) ;
+extern int nsss_switch_grp_rewind (nsss_switch_t *, tain const *, tain *) ;
#define nsss_switch_grp_rewind_g(a, deadline) nsss_switch_grp_rewind(a, (deadline), &STAMP)
-extern int nsss_switch_grp_get (nsss_switch_t *, struct group *, stralloc *, genalloc *, tain_t const *, tain_t *) ;
+extern int nsss_switch_grp_get (nsss_switch_t *, struct group *, stralloc *, genalloc *, tain const *, tain *) ;
#define nsss_switch_grp_get_g(a, b, sa, ga, deadline) nsss_switch_grp_get(a, b, sa, ga, (deadline), &STAMP)
-extern int nsss_switch_grp_getbyname (nsss_switch_t *, struct group *, stralloc *, genalloc *, char const *, tain_t const *, tain_t *) ;
+extern int nsss_switch_grp_getbyname (nsss_switch_t *, struct group *, stralloc *, genalloc *, char const *, tain const *, tain *) ;
#define nsss_switch_grp_getbyname_g(a, b, sa, ga, name, deadline) nsss_switch_grp_getbyname(a, b, sa, ga, name, (deadline), &STAMP)
-extern int nsss_switch_grp_getbygid (nsss_switch_t *, struct group *, stralloc *, genalloc *, gid_t, tain_t const *, tain_t *) ;
+extern int nsss_switch_grp_getbygid (nsss_switch_t *, struct group *, stralloc *, genalloc *, gid_t, tain const *, tain *) ;
#define nsss_switch_grp_getbygid_g(a, b, sa, ga, g, deadline) nsss_switch_grp_getbygid(a, b, sa, ga, g, (deadline), &STAMP)
-extern int nsss_switch_grp_getlist (nsss_switch_t *, char const *, gid_t *, size_t, size_t *, stralloc *, tain_t const *, tain_t *) ;
+extern int nsss_switch_grp_getlist (nsss_switch_t *, char const *, gid_t *, size_t, size_t *, stralloc *, tain const *, tain *) ;
#define nsss_switch_grp_getlist_g(a, user, gids, n, r, sa, deadline) nsss_switch_grp_getlist(a, user, gids, n, r, sa, (deadline), &STAMP)
@@ -90,13 +90,13 @@ extern int nsss_switch_grp_getlist (nsss_switch_t *, char const *, gid_t *, size
#define NSSS_SWITCH_SHADOW_GET '\042'
#define NSSS_SWITCH_SHADOW_GETBYNAME '\043'
-extern int nsss_switch_shadow_end (nsss_switch_t *, tain_t const *, tain_t *) ;
+extern int nsss_switch_shadow_end (nsss_switch_t *, tain const *, tain *) ;
#define nsss_switch_shadow_end_g(a, deadline) nsss_switch_shadow_end(a, (deadline), &STAMP)
-extern int nsss_switch_shadow_rewind (nsss_switch_t *, tain_t const *, tain_t *) ;
+extern int nsss_switch_shadow_rewind (nsss_switch_t *, tain const *, tain *) ;
#define nsss_switch_shadow_rewind_g(a, deadline) nsss_switch_shadow_rewind(a, (deadline), &STAMP)
-extern int nsss_switch_shadow_get (nsss_switch_t *, struct spwd *, stralloc *, tain_t const *, tain_t *) ;
+extern int nsss_switch_shadow_get (nsss_switch_t *, struct spwd *, stralloc *, tain const *, tain *) ;
#define nsss_switch_shadow_get_g(a, b, sa, deadline) nsss_switch_shadow_get(a, b, sa, (deadline), &STAMP)
-extern int nsss_switch_shadow_getbyname (nsss_switch_t *, struct spwd *, stralloc *, char const *, tain_t const *, tain_t *) ;
+extern int nsss_switch_shadow_getbyname (nsss_switch_t *, struct spwd *, stralloc *, char const *, tain const *, tain *) ;
#define nsss_switch_shadow_getbyname_g(a, b, sa, name, deadline) nsss_switch_shadow_getbyname(a, b, sa, name, (deadline), &STAMP)
#endif
diff --git a/src/libnsss/nsss-switch-internal.h b/src/libnsss/nsss-switch-internal.h
index e005ffc..2b93434 100644
--- a/src/libnsss/nsss-switch-internal.h
+++ b/src/libnsss/nsss-switch-internal.h
@@ -13,9 +13,9 @@
#include <nsss/nsss-switch.h>
extern nsss_switch_t nsss_switch_here ;
-extern int nsss_switch_op (nsss_switch_t *, char, tain_t const *, tain_t *) ;
-extern int nsss_switch_pwd_read (buffer *, struct passwd *, stralloc *, tain_t const *, tain_t *) ;
-extern int nsss_switch_grp_read (buffer *, struct group *, stralloc *, genalloc *, tain_t const *, tain_t *) ;
-extern int nsss_switch_shadow_read (buffer *, struct spwd *, stralloc *, tain_t const *, tain_t *) ;
+extern int nsss_switch_op (nsss_switch_t *, char, tain const *, tain *) ;
+extern int nsss_switch_pwd_read (buffer *, struct passwd *, stralloc *, tain const *, tain *) ;
+extern int nsss_switch_grp_read (buffer *, struct group *, stralloc *, genalloc *, tain const *, tain *) ;
+extern int nsss_switch_shadow_read (buffer *, struct spwd *, stralloc *, tain const *, tain *) ;
#endif
diff --git a/src/libnsss/nsss_switch_grp_end.c b/src/libnsss/nsss_switch_grp_end.c
index 3b8ba21..da42cd4 100644
--- a/src/libnsss/nsss_switch_grp_end.c
+++ b/src/libnsss/nsss_switch_grp_end.c
@@ -3,7 +3,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_grp_end (nsss_switch_t *a, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_grp_end (nsss_switch_t *a, tain const *deadline, tain *stamp)
{
return nsss_switch_op(a, NSSS_SWITCH_GRP_END, deadline, stamp) ;
}
diff --git a/src/libnsss/nsss_switch_grp_get.c b/src/libnsss/nsss_switch_grp_get.c
index 65da4e3..8ba52b1 100644
--- a/src/libnsss/nsss_switch_grp_get.c
+++ b/src/libnsss/nsss_switch_grp_get.c
@@ -6,7 +6,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_grp_get (nsss_switch_t *a, struct group *gr, stralloc *sa, genalloc *ga, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_grp_get (nsss_switch_t *a, struct group *gr, stralloc *sa, genalloc *ga, tain const *deadline, tain *stamp)
{
unsigned char c = NSSS_SWITCH_GRP_GET ;
if (!ipc_timed_send(buffer_fd(&a->b), (char *)&c, 1, deadline, stamp)) return 0 ;
diff --git a/src/libnsss/nsss_switch_grp_getbygid.c b/src/libnsss/nsss_switch_grp_getbygid.c
index 3b9802b..8a4e7e3 100644
--- a/src/libnsss/nsss_switch_grp_getbygid.c
+++ b/src/libnsss/nsss_switch_grp_getbygid.c
@@ -7,7 +7,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_grp_getbygid (nsss_switch_t *a, struct group *gr, stralloc *sa, genalloc *ga, gid_t gid, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_grp_getbygid (nsss_switch_t *a, struct group *gr, stralloc *sa, genalloc *ga, gid_t gid, tain const *deadline, tain *stamp)
{
char buf[5] = { NSSS_SWITCH_GRP_GETBYGID } ;
uint32_pack_big(buf + 1, gid) ;
diff --git a/src/libnsss/nsss_switch_grp_getbyname.c b/src/libnsss/nsss_switch_grp_getbyname.c
index 2ece9d2..086cdb1 100644
--- a/src/libnsss/nsss_switch_grp_getbyname.c
+++ b/src/libnsss/nsss_switch_grp_getbyname.c
@@ -9,7 +9,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_grp_getbyname (nsss_switch_t *a, struct group *gr, stralloc *sa, genalloc *ga, char const *name, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_grp_getbyname (nsss_switch_t *a, struct group *gr, stralloc *sa, genalloc *ga, char const *name, tain const *deadline, tain *stamp)
{
char buf[5] = { NSSS_SWITCH_GRP_GETBYNAME } ;
size_t len = strlen(name) ;
diff --git a/src/libnsss/nsss_switch_grp_getlist.c b/src/libnsss/nsss_switch_grp_getlist.c
index 70e4486..abd4d84 100644
--- a/src/libnsss/nsss_switch_grp_getlist.c
+++ b/src/libnsss/nsss_switch_grp_getlist.c
@@ -21,7 +21,7 @@
min(n, r) * sizeof(gid_t) bytes: the list of gids
*/
-static int nsss_switch_grouplist_read (buffer *b, size_t n, size_t *r, gid_t *gids, stralloc *sa, tain_t const *deadline, tain_t *stamp)
+static int nsss_switch_grouplist_read (buffer *b, size_t n, size_t *r, gid_t *gids, stralloc *sa, tain const *deadline, tain *stamp)
{
size_t rr ;
uint64_t res ;
@@ -51,7 +51,7 @@ static int nsss_switch_grouplist_read (buffer *b, size_t n, size_t *r, gid_t *gi
return 1 ;
}
-int nsss_switch_grp_getlist (nsss_switch_t *a, char const *user, gid_t *gids, size_t n, size_t *r, stralloc *sa, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_grp_getlist (nsss_switch_t *a, char const *user, gid_t *gids, size_t n, size_t *r, stralloc *sa, tain const *deadline, tain *stamp)
{
char buf[13] = { NSSS_SWITCH_GRP_GETLIST } ;
size_t len = strlen(user) ;
diff --git a/src/libnsss/nsss_switch_grp_read.c b/src/libnsss/nsss_switch_grp_read.c
index 1ab6cbb..47577f0 100644
--- a/src/libnsss/nsss_switch_grp_read.c
+++ b/src/libnsss/nsss_switch_grp_read.c
@@ -24,7 +24,7 @@
sequence of n \0-terminated elements in gr_mem
*/
-int nsss_switch_grp_read (buffer *b, struct group *gr, stralloc *sa, genalloc *ga, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_grp_read (buffer *b, struct group *gr, stralloc *sa, genalloc *ga, tain const *deadline, tain *stamp)
{
struct group grtmp ;
uint32_t total, len, n, x ;
diff --git a/src/libnsss/nsss_switch_grp_rewind.c b/src/libnsss/nsss_switch_grp_rewind.c
index 347b071..78c0b61 100644
--- a/src/libnsss/nsss_switch_grp_rewind.c
+++ b/src/libnsss/nsss_switch_grp_rewind.c
@@ -3,7 +3,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_grp_rewind (nsss_switch_t *a, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_grp_rewind (nsss_switch_t *a, tain const *deadline, tain *stamp)
{
return nsss_switch_op(a, NSSS_SWITCH_GRP_REWIND, deadline, stamp) ;
}
diff --git a/src/libnsss/nsss_switch_op.c b/src/libnsss/nsss_switch_op.c
index 8b5bee3..77c49ed 100644
--- a/src/libnsss/nsss_switch_op.c
+++ b/src/libnsss/nsss_switch_op.c
@@ -6,7 +6,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_op (nsss_switch_t *a, char op, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_op (nsss_switch_t *a, char op, tain const *deadline, tain *stamp)
{
char c ;
if (!ipc_timed_send(buffer_fd(&a->b), &op, 1, deadline, stamp)) return 0 ;
diff --git a/src/libnsss/nsss_switch_pwd_end.c b/src/libnsss/nsss_switch_pwd_end.c
index a082474..f4a5d51 100644
--- a/src/libnsss/nsss_switch_pwd_end.c
+++ b/src/libnsss/nsss_switch_pwd_end.c
@@ -3,7 +3,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_pwd_end (nsss_switch_t *a, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_pwd_end (nsss_switch_t *a, tain const *deadline, tain *stamp)
{
return nsss_switch_op(a, NSSS_SWITCH_PWD_END, deadline, stamp) ;
}
diff --git a/src/libnsss/nsss_switch_pwd_get.c b/src/libnsss/nsss_switch_pwd_get.c
index 0c630f8..6b9c310 100644
--- a/src/libnsss/nsss_switch_pwd_get.c
+++ b/src/libnsss/nsss_switch_pwd_get.c
@@ -6,7 +6,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_pwd_get (nsss_switch_t *a, struct passwd *pw, stralloc *sa, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_pwd_get (nsss_switch_t *a, struct passwd *pw, stralloc *sa, tain const *deadline, tain *stamp)
{
char c = NSSS_SWITCH_PWD_GET ;
if (!ipc_timed_send(buffer_fd(&a->b), &c, 1, deadline, stamp)) return 0 ;
diff --git a/src/libnsss/nsss_switch_pwd_getbyname.c b/src/libnsss/nsss_switch_pwd_getbyname.c
index a10d129..9b3d164 100644
--- a/src/libnsss/nsss_switch_pwd_getbyname.c
+++ b/src/libnsss/nsss_switch_pwd_getbyname.c
@@ -9,7 +9,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_pwd_getbyname (nsss_switch_t *a, struct passwd *pw, stralloc *sa, char const *name, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_pwd_getbyname (nsss_switch_t *a, struct passwd *pw, stralloc *sa, char const *name, tain const *deadline, tain *stamp)
{
char buf[5] = { NSSS_SWITCH_PWD_GETBYNAME } ;
size_t len = strlen(name) ;
diff --git a/src/libnsss/nsss_switch_pwd_getbyuid.c b/src/libnsss/nsss_switch_pwd_getbyuid.c
index b1d98cf..3e95e9e 100644
--- a/src/libnsss/nsss_switch_pwd_getbyuid.c
+++ b/src/libnsss/nsss_switch_pwd_getbyuid.c
@@ -7,7 +7,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_pwd_getbyuid (nsss_switch_t *a, struct passwd *pw, stralloc *sa, uid_t uid, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_pwd_getbyuid (nsss_switch_t *a, struct passwd *pw, stralloc *sa, uid_t uid, tain const *deadline, tain *stamp)
{
char buf[5] = { NSSS_SWITCH_PWD_GETBYUID } ;
uint32_pack_big(buf + 1, uid) ;
diff --git a/src/libnsss/nsss_switch_pwd_read.c b/src/libnsss/nsss_switch_pwd_read.c
index 759bc23..4cfb9c5 100644
--- a/src/libnsss/nsss_switch_pwd_read.c
+++ b/src/libnsss/nsss_switch_pwd_read.c
@@ -24,7 +24,7 @@
\0-terminated pw_shell
*/
-int nsss_switch_pwd_read (buffer *b, struct passwd *pw, stralloc *sa, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_pwd_read (buffer *b, struct passwd *pw, stralloc *sa, tain const *deadline, tain *stamp)
{
struct passwd pwtmp ;
uint32_t total, len, x ;
diff --git a/src/libnsss/nsss_switch_pwd_rewind.c b/src/libnsss/nsss_switch_pwd_rewind.c
index 9920760..f2068be 100644
--- a/src/libnsss/nsss_switch_pwd_rewind.c
+++ b/src/libnsss/nsss_switch_pwd_rewind.c
@@ -3,7 +3,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_pwd_rewind (nsss_switch_t *a, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_pwd_rewind (nsss_switch_t *a, tain const *deadline, tain *stamp)
{
return nsss_switch_op(a, NSSS_SWITCH_PWD_REWIND, deadline, stamp) ;
}
diff --git a/src/libnsss/nsss_switch_shadow_end.c b/src/libnsss/nsss_switch_shadow_end.c
index eb3454d..afa5699 100644
--- a/src/libnsss/nsss_switch_shadow_end.c
+++ b/src/libnsss/nsss_switch_shadow_end.c
@@ -3,7 +3,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_shadow_end (nsss_switch_t *a, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_shadow_end (nsss_switch_t *a, tain const *deadline, tain *stamp)
{
return nsss_switch_op(a, NSSS_SWITCH_SHADOW_END, deadline, stamp) ;
}
diff --git a/src/libnsss/nsss_switch_shadow_get.c b/src/libnsss/nsss_switch_shadow_get.c
index e510232..27b1e70 100644
--- a/src/libnsss/nsss_switch_shadow_get.c
+++ b/src/libnsss/nsss_switch_shadow_get.c
@@ -6,7 +6,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_shadow_get (nsss_switch_t *a, struct spwd *sp, stralloc *sa, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_shadow_get (nsss_switch_t *a, struct spwd *sp, stralloc *sa, tain const *deadline, tain *stamp)
{
char c = NSSS_SWITCH_SHADOW_GET ;
if (!ipc_timed_send(buffer_fd(&a->b), &c, 1, deadline, stamp)) return 0 ;
diff --git a/src/libnsss/nsss_switch_shadow_getbyname.c b/src/libnsss/nsss_switch_shadow_getbyname.c
index 33fa426..5e91c5a 100644
--- a/src/libnsss/nsss_switch_shadow_getbyname.c
+++ b/src/libnsss/nsss_switch_shadow_getbyname.c
@@ -9,7 +9,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_shadow_getbyname (nsss_switch_t *a, struct spwd *sp, stralloc *sa, char const *name, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_shadow_getbyname (nsss_switch_t *a, struct spwd *sp, stralloc *sa, char const *name, tain const *deadline, tain *stamp)
{
char buf[5] = { NSSS_SWITCH_SHADOW_GETBYNAME } ;
size_t len = strlen(name) ;
diff --git a/src/libnsss/nsss_switch_shadow_read.c b/src/libnsss/nsss_switch_shadow_read.c
index 709d031..7d4c2a4 100644
--- a/src/libnsss/nsss_switch_shadow_read.c
+++ b/src/libnsss/nsss_switch_shadow_read.c
@@ -27,7 +27,7 @@
\0-terminated sp_pwdp
*/
-int nsss_switch_shadow_read (buffer *b, struct spwd *sp, stralloc *sa, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_shadow_read (buffer *b, struct spwd *sp, stralloc *sa, tain const *deadline, tain *stamp)
{
struct spwd sptmp ;
uint64_t x ;
diff --git a/src/libnsss/nsss_switch_shadow_rewind.c b/src/libnsss/nsss_switch_shadow_rewind.c
index 449f25c..9ebf76c 100644
--- a/src/libnsss/nsss_switch_shadow_rewind.c
+++ b/src/libnsss/nsss_switch_shadow_rewind.c
@@ -3,7 +3,7 @@
#include <nsss/nsss-switch.h>
#include "nsss-switch-internal.h"
-int nsss_switch_shadow_rewind (nsss_switch_t *a, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_shadow_rewind (nsss_switch_t *a, tain const *deadline, tain *stamp)
{
return nsss_switch_op(a, NSSS_SWITCH_SHADOW_REWIND, deadline, stamp) ;
}
diff --git a/src/libnsss/nsss_switch_start.c b/src/libnsss/nsss_switch_start.c
index 31e8b42..220a7e2 100644
--- a/src/libnsss/nsss_switch_start.c
+++ b/src/libnsss/nsss_switch_start.c
@@ -6,7 +6,7 @@
#include <nsss/nsss-switch.h>
-static inline int nsss_switch_connect (nsss_switch_t *a, char const *path, tain_t const *deadline, tain_t *stamp)
+static inline int nsss_switch_connect (nsss_switch_t *a, char const *path, tain const *deadline, tain *stamp)
{
int fd = ipc_stream_nbcoe() ;
if (fd < 0) return 0 ;
@@ -19,7 +19,7 @@ static inline int nsss_switch_connect (nsss_switch_t *a, char const *path, tain_
return 1 ;
}
-int nsss_switch_start (nsss_switch_t *a, unsigned int what, char const *path, tain_t const *deadline, tain_t *stamp)
+int nsss_switch_start (nsss_switch_t *a, unsigned int what, char const *path, tain const *deadline, tain *stamp)
{
if (!a->held && !nsss_switch_connect(a, path, deadline, stamp)) return 0 ;
a->held |= (1U << what) ;
diff --git a/src/nsssd/nsssd-nslcd.c b/src/nsssd/nsssd-nslcd.c
index 047be33..75df846 100644
--- a/src/nsssd/nsssd-nslcd.c
+++ b/src/nsssd/nsssd-nslcd.c
@@ -48,7 +48,7 @@ struct nslcd_handle_s
.needdata = 0 \
}
-static tain_t tto = TAIN_INFINITE_RELATIVE ;
+static tain tto = TAIN_INFINITE_RELATIVE ;
void *nsssd_handle_init (void)
{
@@ -79,7 +79,7 @@ void nsssd_handle_end (void *handle)
*a = nslcd_handle_zero ;
}
-static int read_uint32 (buffer *b, uint32_t *x, tain_t const *deadline)
+static int read_uint32 (buffer *b, uint32_t *x, tain const *deadline)
{
char pack[4] ;
if (buffer_timed_get_g(b, pack, 4, deadline) < 4) return 0 ;
@@ -87,7 +87,7 @@ static int read_uint32 (buffer *b, uint32_t *x, tain_t const *deadline)
return 1 ;
}
-static int read_string (buffer *b, size_t *value, stralloc *sa, tain_t const *deadline)
+static int read_string (buffer *b, size_t *value, stralloc *sa, tain const *deadline)
{
uint32_t len ;
if (!read_uint32(b, &len, deadline)) return 0 ;
@@ -99,7 +99,7 @@ static int read_string (buffer *b, size_t *value, stralloc *sa, tain_t const *de
return 1 ;
}
-static inline int read_stringlist (buffer *b, size_t *head, size_t *n, stralloc *sa, genalloc *ga, tain_t const *deadline)
+static inline int read_stringlist (buffer *b, size_t *head, size_t *n, stralloc *sa, genalloc *ga, tain const *deadline)
{
uint32_t i ;
size_t *p ;
@@ -112,7 +112,7 @@ static inline int read_stringlist (buffer *b, size_t *head, size_t *n, stralloc
return 1 ;
}
-static inline int read_header (buffer *b, uint32_t action, tain_t const *deadline)
+static inline int read_header (buffer *b, uint32_t action, tain const *deadline)
{
uint32_t x ;
char pack[8] ;
@@ -124,7 +124,7 @@ static inline int read_header (buffer *b, uint32_t action, tain_t const *deadlin
return 1 ;
}
-static int read_beginend (buffer *b, tain_t const *deadline)
+static int read_beginend (buffer *b, tain const *deadline)
{
uint32_t x ;
if (!read_uint32(b, &x, deadline)) return -1 ;
@@ -136,7 +136,7 @@ static int read_beginend (buffer *b, tain_t const *deadline)
}
}
-static int read_eof (buffer *b, tain_t const *deadline)
+static int read_eof (buffer *b, tain const *deadline)
{
char c ;
ssize_t r = buffer_timed_get_g(b, &c, 1, deadline) ;
@@ -145,7 +145,7 @@ static int read_eof (buffer *b, tain_t const *deadline)
return 1 ;
}
-static int read_endeof(buffer *b, tain_t const *deadline)
+static int read_endeof(buffer *b, tain const *deadline)
{
int r = read_beginend(b, deadline) ;
if (r < 0) return 0 ;
@@ -153,7 +153,7 @@ static int read_endeof(buffer *b, tain_t const *deadline)
return read_eof(b, deadline) ;
}
-static int read_pw (buffer *b, nsssd_passwd_t *pw, stralloc *sa, tain_t const *deadline)
+static int read_pw (buffer *b, nsssd_passwd_t *pw, stralloc *sa, tain const *deadline)
{
uint32_t x ;
if (!read_string(b, &pw->pw_name, sa, deadline)) return 0 ;
@@ -168,7 +168,7 @@ static int read_pw (buffer *b, nsssd_passwd_t *pw, stralloc *sa, tain_t const *d
return 1 ;
}
-static int read_gr (buffer *b, nsssd_group_t *gr, stralloc *sa, genalloc *ga, tain_t const *deadline)
+static int read_gr (buffer *b, nsssd_group_t *gr, stralloc *sa, genalloc *ga, tain const *deadline)
{
uint32_t x ;
if (!read_string(b, &gr->gr_name, sa, deadline)) return 0 ;
@@ -179,7 +179,7 @@ static int read_gr (buffer *b, nsssd_group_t *gr, stralloc *sa, genalloc *ga, ta
return 1 ;
}
-static int read_sp (buffer *b, nsssd_spwd_t *sp, stralloc *sa, tain_t const *deadline)
+static int read_sp (buffer *b, nsssd_spwd_t *sp, stralloc *sa, tain const *deadline)
{
uint32_t x ;
if (!read_string(b, &sp->sp_namp, sa, deadline)) return 0 ;
@@ -201,7 +201,7 @@ static int read_sp (buffer *b, nsssd_spwd_t *sp, stralloc *sa, tain_t const *dea
return 1 ;
}
-static int nslcd_connect (nslcd_handle_t *a, uint32_t action, struct iovec const *v, unsigned int n, tain_t const *deadline)
+static int nslcd_connect (nslcd_handle_t *a, uint32_t action, struct iovec const *v, unsigned int n, tain const *deadline)
{
char pack[8] ;
int fd = ipc_stream_nbcoe() ;
@@ -240,7 +240,7 @@ int nsssd_pwd_rewind (void *handle)
static inline int pwd_getall (nslcd_handle_t *a)
{
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[8192] ;
@@ -286,7 +286,7 @@ int nsssd_pwd_getbyuid (void *handle, struct passwd *pw, uid_t uid)
{
nslcd_handle_t *a = handle ;
nsssd_passwd_t pwc ;
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[4096] ;
@@ -314,7 +314,7 @@ int nsssd_pwd_getbyname (void *handle, struct passwd *pw, char const *name)
{
nslcd_handle_t *a = handle ;
nsssd_passwd_t pwc ;
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[4096] ;
@@ -361,7 +361,7 @@ int nsssd_grp_rewind (void *handle)
static inline int grp_getall (nslcd_handle_t *a)
{
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[8192] ;
@@ -412,7 +412,7 @@ int nsssd_grp_getbygid (void *handle, struct group *gr, gid_t gid)
{
nslcd_handle_t *a = handle ;
nsssd_group_t grc ;
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[4096] ;
@@ -442,7 +442,7 @@ int nsssd_grp_getbyname (void *handle, struct group *gr, char const *name)
{
nslcd_handle_t *a = handle ;
nsssd_group_t grc ;
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[4096] ;
@@ -500,7 +500,7 @@ int nsssd_shadow_rewind (void *handle)
static inline int shadow_getall (nslcd_handle_t *a)
{
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[8192] ;
@@ -546,7 +546,7 @@ int nsssd_shadow_getbyname (void *handle, struct spwd *sp, char const *name)
{
nslcd_handle_t *a = handle ;
nsssd_spwd_t spc ;
- tain_t deadline ;
+ tain deadline ;
int fd ;
buffer b ;
char buf[4096] ;
@@ -577,7 +577,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
{
PROG = "nsssd-nslcd" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
uint32_t t = 0 ;
for (;;)
{
diff --git a/src/nsssd/nsssd_main.c b/src/nsssd/nsssd_main.c
index 2f4c625..9dbc27c 100644
--- a/src/nsssd/nsssd_main.c
+++ b/src/nsssd/nsssd_main.c
@@ -26,7 +26,7 @@ static unsigned int initted = 0 ;
static void get0 (char *s, size_t n)
{
- tain_t deadline ;
+ tain deadline ;
tain_ulong(&deadline, 30) ;
tain_add_g(&deadline, &deadline) ;
if (buffer_timed_get_g(buffer_0small, s, n, &deadline) < n)
@@ -36,7 +36,7 @@ static void get0 (char *s, size_t n)
static void put1 (char const *s, size_t n)
{
size_t w = 0 ;
- tain_t deadline ;
+ tain deadline ;
tain_ulong(&deadline, 30) ;
tain_add_g(&deadline, &deadline) ;
while (!buffer_putall(buffer_1, s, n, &w))
@@ -48,7 +48,7 @@ static void put1 (char const *s, size_t n)
static void flush1 (void)
{
- tain_t deadline ;
+ tain deadline ;
tain_ulong(&deadline, 2) ;
tain_add_g(&deadline, &deadline) ;
if (!buffer_timed_flush_g(buffer_1, &deadline))
@@ -461,7 +461,7 @@ int nsssd_main (char const *const *argv, char const *const *envp)
for (;;)
{
- tain_t deadline ;
+ tain deadline ;
char c ;
tain_add_g(&deadline, &tain_infinite_relative) ;
if (!buffer_timed_get_g(buffer_0small, &c, 1, &deadline)) break ;
diff --git a/src/tests/test-switch.c b/src/tests/test-switch.c
index 937ec03..02bbfde 100644
--- a/src/tests/test-switch.c
+++ b/src/tests/test-switch.c
@@ -18,7 +18,7 @@ int main (void)
nsss_switch_t a = NSSS_SWITCH_ZERO ;
stralloc sa = STRALLOC_ZERO ;
genalloc ga = GENALLOC_ZERO ;
- tain_t deadline ;
+ tain deadline ;
PROG = "test-switch" ;
tain_now_set_stopwatch_g() ;
tain_from_millisecs(&deadline, 10000) ;