diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-01-06 16:47:50 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-01-18 09:27:56 -0500 |
commit | fd3714d0cf068f3c782c1fff32105fc51cc97a0e (patch) | |
tree | 4763af29c0a5e3fa2dd293744dccb1f268e7fca9 /src/sss_client/sss_cli.h | |
parent | 4e19af30cbaf819bdd88f7d0390aeabeb2797a60 (diff) | |
download | sssd-fd3714d0cf068f3c782c1fff32105fc51cc97a0e.tar.gz sssd-fd3714d0cf068f3c782c1fff32105fc51cc97a0e.tar.bz2 sssd-fd3714d0cf068f3c782c1fff32105fc51cc97a0e.zip |
NSS: Add sss_readrep_copy_string
There were many places in the client code where we were
duplicating a loop to copy data in from the response buffer. This
patch turns those loops into a function for easier maintenance and
easier-to-read *readrep() routines.
Diffstat (limited to 'src/sss_client/sss_cli.h')
-rw-r--r-- | src/sss_client/sss_cli.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sss_client/sss_cli.h b/src/sss_client/sss_cli.h index dc15ac13..c6e53e60 100644 --- a/src/sss_client/sss_cli.h +++ b/src/sss_client/sss_cli.h @@ -36,6 +36,11 @@ typedef int errno_t; #endif + +#ifndef EOK +#define EOK 0 +#endif + #define SSS_NSS_PROTOCOL_VERSION 1 #define SSS_PAM_PROTOCOL_VERSION 3 #define SSS_SUDO_PROTOCOL_VERSION 0 @@ -508,4 +513,11 @@ void sss_nss_unlock(void); void sss_pam_lock(void); void sss_pam_unlock(void); +errno_t sss_readrep_copy_string(const char *in, + size_t *offset, + size_t *slen, + size_t *dlen, + char **out, + size_t *size); + #endif /* _SSSCLI_H */ |