nsssrv.h revision 312818233ce48471c56d1a7589579892d9726e3b
8723ec450f2e7a024230467c0c28a3f154905483cmaeder/*
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder SSSD
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder NSS Responder, header file
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder Copyright (C) Simo Sorce <ssorce@redhat.com> 2008
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder This program is free software; you can redistribute it and/or modify
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder it under the terms of the GNU General Public License as published by
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder the Free Software Foundation; either version 3 of the License, or
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder (at your option) any later version.
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder
99b26e2ab8ba89bc9a050c1524137eb6269e2753Christian Maeder This program is distributed in the hope that it will be useful,
18548c6cc2dff13bf9f5f08b3f6cde6ca914df1dChristian Maeder but WITHOUT ANY WARRANTY; without even the implied warranty of
92ae4d5885ea837ffe3dae9b2de742f871229b94Christian Maeder MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder GNU General Public License for more details.
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder
ef1c24c8229ade3ac872febebd18c181e32fb9c4Christian Maeder You should have received a copy of the GNU General Public License
8d2321e17a34951fbd52f68e9f9f148f0890e471Christian Maeder along with this program. If not, see <http://www.gnu.org/licenses/>.
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder*/
99b26e2ab8ba89bc9a050c1524137eb6269e2753Christian Maeder
986888e7f4d8ed681272a79c63f329ce8037063dcmaeder#ifndef __NSSSRV_H__
eae0d62755147d991cc3e903f74f98ac31a7cd42Christian Maeder#define __NSSSRV_H__
8723ec450f2e7a024230467c0c28a3f154905483cmaeder
8723ec450f2e7a024230467c0c28a3f154905483cmaeder#include <stdint.h>
8723ec450f2e7a024230467c0c28a3f154905483cmaeder#include <sys/un.h>
eae0d62755147d991cc3e903f74f98ac31a7cd42Christian Maeder#include "config.h"
d4263171d0ce2cbc390a7b44bff98e8b3c0f8ce7Christian Maeder#include "talloc.h"
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder#include "tevent.h"
e84c877ad38ce9312eab222a79f44da2015572d2Christian Maeder#include "ldb.h"
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder#include "dbus/dbus.h"
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder#include "sbus/sssd_dbus.h"
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder#include "responder/common/responder_packet.h"
d27b1887e61f1dc53d77c37f59dbf5019242a686Christian Maeder#include "responder/common/responder.h"
ef1c24c8229ade3ac872febebd18c181e32fb9c4Christian Maeder
ef1c24c8229ade3ac872febebd18c181e32fb9c4Christian Maeder#define NSS_SBUS_SERVICE_VERSION 0x0001
945e82ed7877917f3ab1657f555e71991372546aChristian Maeder#define NSS_SBUS_SERVICE_NAME "nss"
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder
c208973c890b8f993297720fd0247bc7481d4304Christian Maeder#define NSS_PACKET_MAX_RECV_SIZE 1024
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder
ef1c24c8229ade3ac872febebd18c181e32fb9c4Christian Maederstruct getent_ctx;
ef1c24c8229ade3ac872febebd18c181e32fb9c4Christian Maederstruct sss_mc_ctx;
7c99a6c982aaf61547de8054296c8055c8d1a13aSimon Ulbricht
ef1c24c8229ade3ac872febebd18c181e32fb9c4Christian Maederstruct nss_ctx {
024703c9d1326c23e307c0b0d453ed3358e87fe4cmaeder struct resp_ctx *rctx;
d97700a22b2585ece83b05f3fff945fdfd0c44b4Christian Maeder
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder int neg_timeout;
ea5ccb1c6e89486a54e1f4bd95840147e96093edChristian Maeder struct sss_nc_ctx *ncache;
de8eee2014437ec4020be15cd363257f87e79943Christian Maeder
ea5ccb1c6e89486a54e1f4bd95840147e96093edChristian Maeder int cache_refresh_percent;
fd94a6f66ccb5cef99aa42069b61e4b8734dbd3fChristian Maeder
fd94a6f66ccb5cef99aa42069b61e4b8734dbd3fChristian Maeder int enum_cache_timeout;
fd94a6f66ccb5cef99aa42069b61e4b8734dbd3fChristian Maeder
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder struct getent_ctx *pctx;
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder struct getent_ctx *gctx;
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder struct getent_ctx *svcctx;
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder hash_table_t *netgroups;
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder bool filter_users_in_groups;
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder char *pwfield;
6a88f8edd881afaf4b865b01bfbb4faaf0e7a3c9Simon Ulbricht
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder char *override_homedir;
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder char *fallback_homedir;
844c7d2ec3917393e139e53503757098d568713eSimon Ulbricht char **allowed_shells;
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder char **vetoed_shells;
734a5ebd38032798f0ab908e2d52862c71b2c127Simon Ulbricht char **etc_shells;
ea5ccb1c6e89486a54e1f4bd95840147e96093edChristian Maeder char *shell_fallback;
c8afa08a8bda589ef6670068dff0108464be4da7Christian Maeder char *default_shell;
c99b0eb6632087d502dd4269599c5aa68a148eebSimon Ulbricht
024703c9d1326c23e307c0b0d453ed3358e87fe4cmaeder struct sss_mc_ctx *pwd_mc_ctx;
b99c9606f2faafeabb3fa8c596992143a561c787Simon Ulbricht struct sss_mc_ctx *grp_mc_ctx;
df67ddf64192bfcae6ece65255ad796a17cbe532Christian Maeder};
3e87e1dc85fa76cc6eaeb8eafbc0bea77af939f4Christian Maeder
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maederstruct nss_packet;
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder
526e7f36639cb58e3c99a54bea082499a6b04a25Christian Maederint nss_cmd_execute(struct cli_ctx *cctx);
473f5af6e4803fbeecc814065952396f2501039bChristian Maeder
f675b8f0a612e37472640da57b48d795bef4427eChristian Maederstruct sss_cmd_table *get_nss_cmds(void);
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder
526e7f36639cb58e3c99a54bea082499a6b04a25Christian Maeder#endif /* __NSSSRV_H__ */
275698320a734a6fd647ea6a461d6ce38862da1dChristian Maeder