summaryrefslogtreecommitdiff
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
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>
-rw-r--r--CONTRIBUTING5
-rw-r--r--DCO37
-rw-r--r--INSTALL4
-rw-r--r--NEWS6
-rw-r--r--doc/index.html8
-rw-r--r--doc/upgrade.html9
-rw-r--r--package/info2
-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
32 files changed, 132 insertions, 75 deletions
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 0000000..6279422
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,5 @@
+ Please add a Signed-Off-By: line at the end of your commit,
+which certifies that you have the right and authority to pass
+it on as an open-source patch, as explicited in the Developer's
+Certificate of Origin available in this project's DCO file,
+or at https://developercertificate.org/
diff --git a/DCO b/DCO
new file mode 100644
index 0000000..8201f99
--- /dev/null
+++ b/DCO
@@ -0,0 +1,37 @@
+Developer Certificate of Origin
+Version 1.1
+
+Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
+1 Letterman Drive
+Suite D4700
+San Francisco, CA, 94129
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+(c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+(d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
diff --git a/INSTALL b/INSTALL
index a84b20c..a276772 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,9 +6,9 @@ Build Instructions
- A POSIX-compliant C development environment
- GNU make version 3.81 or later
- - skalibs version 2.10.0.3 or later: https://skarnet.org/software/skalibs/
+ - skalibs version 2.11.0.0 or later: https://skarnet.org/software/skalibs/
- To run the test suite and the nsssd-* programs:
- s6 version 2.10.0.3 or later: https://skarnet.org/software/s6/
+ s6 version 2.11.0.0 or later: https://skarnet.org/software/s6/
This software will run on any operating system that implements
POSIX.1-2008, available at:
diff --git a/NEWS b/NEWS
index 14530fd..161e779 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
Changelog for nsss.
+In 0.1.0.2
+----------
+
+ - Adaptation to skalibs-2.11.0.0.
+
+
In 0.1.0.1
----------
diff --git a/doc/index.html b/doc/index.html
index c497798..6af20c4 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -81,11 +81,11 @@ functions.
<li> A POSIX-compliant system with a standard C development environment </li>
<li> GNU make, version 3.81 or later </li>
<li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version
-2.10.0.3 or later. It's a build-time requirement. It's also a run-time
+2.11.0.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs
library. </li>
<li> <a href="//skarnet.org/software/s6/">s6</a> version
-2.10.0.3 or later. It's a <em>run-time</em> requirement only, to run
+2.11.0.0 or later. It's a <em>run-time</em> requirement only, to run
the nsssd service (and can be done without if you have a suitable replacement
for <a href="//skarnet.org/software/s6/s6-ipcserver">s6-ipcserver</a>). </li>
</ul>
@@ -100,7 +100,7 @@ for <a href="//skarnet.org/software/s6/s6-ipcserver">s6-ipcserver</a>). </li>
<h3> Download </h3>
<ul>
- <li> The current released version of nsss is <a href="nsss-0.1.0.1.tar.gz">0.1.0.1</a>. </li>
+ <li> The current released version of nsss is <a href="nsss-0.1.0.2.tar.gz">0.1.0.2</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="//git.skarnet.org/cgi-bin/cgit.cgi/nsss/">nsss
git repository</a>:
@@ -194,7 +194,7 @@ which can be used to write additional backends. </li>
<ul>
<li> <tt>nsss</tt> is discussed on the
-<a href="//skarnet.org/lists.html#skaware">skaware</a> mailing-list. </li>
+<a href="//skarnet.org/lists/#skaware">skaware</a> mailing-list. </li>
</ul>
</body>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 3cf53b6..fa22bcb 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,15 @@
<h1> What has changed in nsss </h1>
+<h2> In 0.1.0.2 </h2>
+
+<ul>
+ <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> dependency bumped to
+2.11.0.0. </li>
+ <li> <a href="//skarnet.org/software/s6/">s6</a> optional dependency bumped to
+2.11.0.0. </li>
+</ul>
+
<h2> In 0.1.0.1 </h2>
<ul>
diff --git a/package/info b/package/info
index 7fa12d7..500ef4c 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=nsss
-version=0.1.0.1
+version=0.1.0.2
category=admin
package_macro_name=NSSS
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) ;