diff options
author | Simo Sorce <simo@redhat.com> | 2011-12-27 12:51:16 -0500 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-01-09 13:29:20 -0500 |
commit | 162858f67e8d47a9dd49d04a9f317a0315c44b0e (patch) | |
tree | fa85d46cde9b55348302dd9f34cd14e2c8e5f064 /src/responder/nss/nsssrv.h | |
parent | 029e6f1727972ffe31f97c7738a98d0efecb3e15 (diff) | |
download | sssd_unused-162858f67e8d47a9dd49d04a9f317a0315c44b0e.tar.gz sssd_unused-162858f67e8d47a9dd49d04a9f317a0315c44b0e.tar.xz sssd_unused-162858f67e8d47a9dd49d04a9f317a0315c44b0e.zip |
nsssrv: add string manipulation helper
the sized_string structure makes it easier to keep track of string lengths
and makes passing around data more compat and readable.
Diffstat (limited to 'src/responder/nss/nsssrv.h')
-rw-r--r-- | src/responder/nss/nsssrv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/responder/nss/nsssrv.h b/src/responder/nss/nsssrv.h index 01a2810c..5e365d7b 100644 --- a/src/responder/nss/nsssrv.h +++ b/src/responder/nss/nsssrv.h @@ -71,4 +71,12 @@ int nss_cmd_execute(struct cli_ctx *cctx); struct sss_cmd_table *get_nss_cmds(void); +/* len includes terminating '\0' */ +struct sized_string { + const char *str; + size_t len; +}; + +void to_sized_string(struct sized_string *out, const char *in); + #endif /* __NSSSRV_H__ */ |