diff options
author | Sumit Bose <sbose@redhat.com> | 2013-04-24 10:49:22 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-02 19:33:56 +0200 |
commit | 2962b3d1e072ff2ebbe343095812dad697d6bf1d (patch) | |
tree | b3f6752176c99221fee6585596c613ad002a9da9 /src/providers/ipa/ipa_subdomains.h | |
parent | 44c379a27a2d8de0ad933ebb2558b5e82b05fd56 (diff) | |
download | sssd-2962b3d1e072ff2ebbe343095812dad697d6bf1d.tar.gz sssd-2962b3d1e072ff2ebbe343095812dad697d6bf1d.tar.xz sssd-2962b3d1e072ff2ebbe343095812dad697d6bf1d.zip |
Use struct to hold different types of request parameters
Currently the POSIX ID or the user name are passed in different
parameters to some calls. The method will get cumbersome and error-prone
if new parameters like, e.g. the SID, are added. This patch adds a union
to hold the different kind of parameters.
Diffstat (limited to 'src/providers/ipa/ipa_subdomains.h')
-rw-r--r-- | src/providers/ipa/ipa_subdomains.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/providers/ipa/ipa_subdomains.h b/src/providers/ipa/ipa_subdomains.h index df7f994d4..c9ab82a25 100644 --- a/src/providers/ipa/ipa_subdomains.h +++ b/src/providers/ipa/ipa_subdomains.h @@ -38,4 +38,18 @@ int ipa_subdom_init(struct be_ctx *be_ctx, struct bet_ops **ops, void **pvt_data); +enum req_input_type { + REQ_INP_NAME, + REQ_INP_ID, + REQ_INP_SECID +}; + +struct req_input { + enum req_input_type type; + union { + const char *name; + uint32_t id; + const char *secid; + } inp; +}; #endif /* _IPA_SUBDOMAINS_H_ */ |