| 1 | /*
|
|---|
| 2 | Unix SMB/CIFS implementation.
|
|---|
| 3 |
|
|---|
| 4 | Windows NT Domain nsswitch module
|
|---|
| 5 |
|
|---|
| 6 | Copyright (C) Tim Potter 2000
|
|---|
| 7 |
|
|---|
| 8 | This library is free software; you can redistribute it and/or
|
|---|
| 9 | modify it under the terms of the GNU Library General Public
|
|---|
| 10 | License as published by the Free Software Foundation; either
|
|---|
| 11 | version 2 of the License, or (at your option) any later version.
|
|---|
| 12 |
|
|---|
| 13 | This library is distributed in the hope that it will be useful,
|
|---|
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 16 | Library General Public License for more details.
|
|---|
| 17 |
|
|---|
| 18 | You should have received a copy of the GNU Library General Public
|
|---|
| 19 | License along with this library; if not, write to the
|
|---|
| 20 | Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|---|
| 21 | Boston, MA 02111-1307, USA.
|
|---|
| 22 | */
|
|---|
| 23 |
|
|---|
| 24 | #include "winbind_client.h"
|
|---|
| 25 |
|
|---|
| 26 | /* Maximum number of users to pass back over the unix domain socket
|
|---|
| 27 | per call. This is not a static limit on the total number of users
|
|---|
| 28 | or groups returned in total. */
|
|---|
| 29 |
|
|---|
| 30 | #define MAX_GETPWENT_USERS 250
|
|---|
| 31 | #define MAX_GETGRENT_USERS 250
|
|---|
| 32 |
|
|---|
| 33 | NSS_STATUS _nss_winbind_setpwent(void);
|
|---|
| 34 | NSS_STATUS _nss_winbind_endpwent(void);
|
|---|
| 35 | NSS_STATUS _nss_winbind_getpwent_r(struct passwd *result, char *buffer,
|
|---|
| 36 | size_t buflen, int *errnop);
|
|---|
| 37 | NSS_STATUS _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result,
|
|---|
| 38 | char *buffer, size_t buflen, int *errnop);
|
|---|
| 39 | NSS_STATUS _nss_winbind_getpwnam_r(const char *name, struct passwd *result,
|
|---|
| 40 | char *buffer, size_t buflen, int *errnop);
|
|---|
| 41 | NSS_STATUS _nss_winbind_setgrent(void);
|
|---|
| 42 | NSS_STATUS _nss_winbind_endgrent(void);
|
|---|
| 43 | NSS_STATUS _nss_winbind_getgrent_r(struct group *result, char *buffer,
|
|---|
| 44 | size_t buflen, int *errnop);
|
|---|
| 45 | NSS_STATUS _nss_winbind_getgrlst_r(struct group *result, char *buffer,
|
|---|
| 46 | size_t buflen, int *errnop);
|
|---|
| 47 | NSS_STATUS _nss_winbind_getgrnam_r(const char *name, struct group *result,
|
|---|
| 48 | char *buffer, size_t buflen, int *errnop);
|
|---|
| 49 | NSS_STATUS _nss_winbind_getgrgid_r(gid_t gid, struct group *result, char *buffer,
|
|---|
| 50 | size_t buflen, int *errnop);
|
|---|
| 51 | NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
|
|---|
| 52 | long int *size, gid_t **groups,
|
|---|
| 53 | long int limit, int *errnop);
|
|---|
| 54 | NSS_STATUS _nss_winbind_getusersids(const char *user_sid, char **group_sids,
|
|---|
| 55 | int *num_groups, char *buffer, size_t buf_size,
|
|---|
| 56 | int *errnop);
|
|---|
| 57 | NSS_STATUS _nss_winbind_nametosid(const char *name, char **sid, char *buffer,
|
|---|
| 58 | size_t buflen, int *errnop);
|
|---|
| 59 | NSS_STATUS _nss_winbind_sidtoname(const char *sid, char **name, char *buffer,
|
|---|
| 60 | size_t buflen, int *errnop);
|
|---|
| 61 | NSS_STATUS _nss_winbind_sidtouid(const char *sid, uid_t *uid, int *errnop);
|
|---|
| 62 | NSS_STATUS _nss_winbind_sidtogid(const char *sid, gid_t *gid, int *errnop);
|
|---|
| 63 | NSS_STATUS _nss_winbind_uidtosid(uid_t uid, char **sid, char *buffer,
|
|---|
| 64 | size_t buflen, int *errnop);
|
|---|
| 65 | NSS_STATUS _nss_winbind_gidtosid(gid_t gid, char **sid, char *buffer,
|
|---|
| 66 | size_t buflen, int *errnop);
|
|---|
| 67 |
|
|---|
| 68 | /* Prototypes from wb_common.c */
|
|---|
| 69 |
|
|---|
| 70 | extern int winbindd_fd;
|
|---|
| 71 |
|
|---|
| 72 | #ifdef DEBUG_NSS
|
|---|
| 73 | static const char *nss_err_str(NSS_STATUS ret) {
|
|---|
| 74 | switch (ret) {
|
|---|
| 75 | case NSS_STATUS_TRYAGAIN:
|
|---|
| 76 | return "NSS_STATUS_TRYAGAIN";
|
|---|
| 77 | case NSS_STATUS_SUCCESS:
|
|---|
| 78 | return "NSS_STATUS_SUCCESS";
|
|---|
| 79 | case NSS_STATUS_NOTFOUND:
|
|---|
| 80 | return "NSS_STATUS_NOTFOUND";
|
|---|
| 81 | case NSS_STATUS_UNAVAIL:
|
|---|
| 82 | return "NSS_STATUS_UNAVAIL";
|
|---|
| 83 | case NSS_STATUS_RETURN:
|
|---|
| 84 | return "NSS_STATUS_RETURN";
|
|---|
| 85 | default:
|
|---|
| 86 | return "UNKNOWN RETURN CODE!!!!!!!";
|
|---|
| 87 | }
|
|---|
| 88 | }
|
|---|
| 89 | #endif
|
|---|
| 90 |
|
|---|
| 91 | /* Allocate some space from the nss static buffer. The buffer and buflen
|
|---|
| 92 | are the pointers passed in by the C library to the _nss_ntdom_*
|
|---|
| 93 | functions. */
|
|---|
| 94 |
|
|---|
| 95 | static char *get_static(char **buffer, size_t *buflen, size_t len)
|
|---|
| 96 | {
|
|---|
| 97 | char *result;
|
|---|
| 98 |
|
|---|
| 99 | /* Error check. We return false if things aren't set up right, or
|
|---|
| 100 | there isn't enough buffer space left. */
|
|---|
| 101 |
|
|---|
| 102 | if ((buffer == NULL) || (buflen == NULL) || (*buflen < len)) {
|
|---|
| 103 | return NULL;
|
|---|
| 104 | }
|
|---|
| 105 |
|
|---|
| 106 | /* Return an index into the static buffer */
|
|---|
| 107 |
|
|---|
| 108 | result = *buffer;
|
|---|
| 109 | *buffer += len;
|
|---|
| 110 | *buflen -= len;
|
|---|
| 111 |
|
|---|
| 112 | return result;
|
|---|
| 113 | }
|
|---|
| 114 |
|
|---|
| 115 | /* I've copied the strtok() replacement function next_token() from
|
|---|
| 116 | lib/util_str.c as I really don't want to have to link in any other
|
|---|
| 117 | objects if I can possibly avoid it. */
|
|---|
| 118 |
|
|---|
| 119 | static BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
|
|---|
| 120 | {
|
|---|
| 121 | char *s;
|
|---|
| 122 | BOOL quoted;
|
|---|
| 123 | size_t len=1;
|
|---|
| 124 |
|
|---|
| 125 | if (!ptr) return(False);
|
|---|
| 126 |
|
|---|
| 127 | s = *ptr;
|
|---|
| 128 |
|
|---|
| 129 | /* default to simple separators */
|
|---|
| 130 | if (!sep) sep = " \t\n\r";
|
|---|
| 131 |
|
|---|
| 132 | /* find the first non sep char */
|
|---|
| 133 | while (*s && strchr(sep,*s)) s++;
|
|---|
| 134 |
|
|---|
| 135 | /* nothing left? */
|
|---|
| 136 | if (! *s) return(False);
|
|---|
| 137 |
|
|---|
| 138 | /* copy over the token */
|
|---|
| 139 | for (quoted = False; len < bufsize && *s && (quoted || !strchr(sep,*s)); s++) {
|
|---|
| 140 | if (*s == '\"') {
|
|---|
| 141 | quoted = !quoted;
|
|---|
| 142 | } else {
|
|---|
| 143 | len++;
|
|---|
| 144 | *buff++ = *s;
|
|---|
| 145 | }
|
|---|
| 146 | }
|
|---|
| 147 |
|
|---|
| 148 | *ptr = (*s) ? s+1 : s;
|
|---|
| 149 | *buff = 0;
|
|---|
| 150 |
|
|---|
| 151 | return(True);
|
|---|
| 152 | }
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 | /* Fill a pwent structure from a winbindd_response structure. We use
|
|---|
| 156 | the static data passed to us by libc to put strings and stuff in.
|
|---|
| 157 | Return NSS_STATUS_TRYAGAIN if we run out of memory. */
|
|---|
| 158 |
|
|---|
| 159 | static NSS_STATUS fill_pwent(struct passwd *result,
|
|---|
| 160 | struct winbindd_pw *pw,
|
|---|
| 161 | char **buffer, size_t *buflen)
|
|---|
| 162 | {
|
|---|
| 163 | /* User name */
|
|---|
| 164 |
|
|---|
| 165 | if ((result->pw_name =
|
|---|
| 166 | get_static(buffer, buflen, strlen(pw->pw_name) + 1)) == NULL) {
|
|---|
| 167 |
|
|---|
| 168 | /* Out of memory */
|
|---|
| 169 |
|
|---|
| 170 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 171 | }
|
|---|
| 172 |
|
|---|
| 173 | strcpy(result->pw_name, pw->pw_name);
|
|---|
| 174 |
|
|---|
| 175 | /* Password */
|
|---|
| 176 |
|
|---|
| 177 | if ((result->pw_passwd =
|
|---|
| 178 | get_static(buffer, buflen, strlen(pw->pw_passwd) + 1)) == NULL) {
|
|---|
| 179 |
|
|---|
| 180 | /* Out of memory */
|
|---|
| 181 |
|
|---|
| 182 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 183 | }
|
|---|
| 184 |
|
|---|
| 185 | strcpy(result->pw_passwd, pw->pw_passwd);
|
|---|
| 186 |
|
|---|
| 187 | /* [ug]id */
|
|---|
| 188 |
|
|---|
| 189 | result->pw_uid = pw->pw_uid;
|
|---|
| 190 | result->pw_gid = pw->pw_gid;
|
|---|
| 191 |
|
|---|
| 192 | /* GECOS */
|
|---|
| 193 |
|
|---|
| 194 | if ((result->pw_gecos =
|
|---|
| 195 | get_static(buffer, buflen, strlen(pw->pw_gecos) + 1)) == NULL) {
|
|---|
| 196 |
|
|---|
| 197 | /* Out of memory */
|
|---|
| 198 |
|
|---|
| 199 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 200 | }
|
|---|
| 201 |
|
|---|
| 202 | strcpy(result->pw_gecos, pw->pw_gecos);
|
|---|
| 203 |
|
|---|
| 204 | /* Home directory */
|
|---|
| 205 |
|
|---|
| 206 | if ((result->pw_dir =
|
|---|
| 207 | get_static(buffer, buflen, strlen(pw->pw_dir) + 1)) == NULL) {
|
|---|
| 208 |
|
|---|
| 209 | /* Out of memory */
|
|---|
| 210 |
|
|---|
| 211 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 212 | }
|
|---|
| 213 |
|
|---|
| 214 | strcpy(result->pw_dir, pw->pw_dir);
|
|---|
| 215 |
|
|---|
| 216 | /* Logon shell */
|
|---|
| 217 |
|
|---|
| 218 | if ((result->pw_shell =
|
|---|
| 219 | get_static(buffer, buflen, strlen(pw->pw_shell) + 1)) == NULL) {
|
|---|
| 220 |
|
|---|
| 221 | /* Out of memory */
|
|---|
| 222 |
|
|---|
| 223 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 224 | }
|
|---|
| 225 |
|
|---|
| 226 | strcpy(result->pw_shell, pw->pw_shell);
|
|---|
| 227 |
|
|---|
| 228 | /* The struct passwd for Solaris has some extra fields which must
|
|---|
| 229 | be initialised or nscd crashes. */
|
|---|
| 230 |
|
|---|
| 231 | #if HAVE_PASSWD_PW_COMMENT
|
|---|
| 232 | result->pw_comment = "";
|
|---|
| 233 | #endif
|
|---|
| 234 |
|
|---|
| 235 | #if HAVE_PASSWD_PW_AGE
|
|---|
| 236 | result->pw_age = "";
|
|---|
| 237 | #endif
|
|---|
| 238 |
|
|---|
| 239 | return NSS_STATUS_SUCCESS;
|
|---|
| 240 | }
|
|---|
| 241 |
|
|---|
| 242 | /* Fill a grent structure from a winbindd_response structure. We use
|
|---|
| 243 | the static data passed to us by libc to put strings and stuff in.
|
|---|
| 244 | Return NSS_STATUS_TRYAGAIN if we run out of memory. */
|
|---|
| 245 |
|
|---|
| 246 | static NSS_STATUS fill_grent(struct group *result, struct winbindd_gr *gr,
|
|---|
| 247 | char *gr_mem, char **buffer, size_t *buflen)
|
|---|
| 248 | {
|
|---|
| 249 | fstring name;
|
|---|
| 250 | int i;
|
|---|
| 251 | char *tst;
|
|---|
| 252 |
|
|---|
| 253 | /* Group name */
|
|---|
| 254 |
|
|---|
| 255 | if ((result->gr_name =
|
|---|
| 256 | get_static(buffer, buflen, strlen(gr->gr_name) + 1)) == NULL) {
|
|---|
| 257 |
|
|---|
| 258 | /* Out of memory */
|
|---|
| 259 |
|
|---|
| 260 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 261 | }
|
|---|
| 262 |
|
|---|
| 263 | strcpy(result->gr_name, gr->gr_name);
|
|---|
| 264 |
|
|---|
| 265 | /* Password */
|
|---|
| 266 |
|
|---|
| 267 | if ((result->gr_passwd =
|
|---|
| 268 | get_static(buffer, buflen, strlen(gr->gr_passwd) + 1)) == NULL) {
|
|---|
| 269 |
|
|---|
| 270 | /* Out of memory */
|
|---|
| 271 |
|
|---|
| 272 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 273 | }
|
|---|
| 274 |
|
|---|
| 275 | strcpy(result->gr_passwd, gr->gr_passwd);
|
|---|
| 276 |
|
|---|
| 277 | /* gid */
|
|---|
| 278 |
|
|---|
| 279 | result->gr_gid = gr->gr_gid;
|
|---|
| 280 |
|
|---|
| 281 | /* Group membership */
|
|---|
| 282 |
|
|---|
| 283 | if ((gr->num_gr_mem < 0) || !gr_mem) {
|
|---|
| 284 | gr->num_gr_mem = 0;
|
|---|
| 285 | }
|
|---|
| 286 |
|
|---|
| 287 | /* this next value is a pointer to a pointer so let's align it */
|
|---|
| 288 |
|
|---|
| 289 | /* Calculate number of extra bytes needed to align on pointer size boundry */
|
|---|
| 290 | if ((i = (unsigned long)(*buffer) % sizeof(char*)) != 0)
|
|---|
| 291 | i = sizeof(char*) - i;
|
|---|
| 292 |
|
|---|
| 293 | if ((tst = get_static(buffer, buflen, ((gr->num_gr_mem + 1) *
|
|---|
| 294 | sizeof(char *)+i))) == NULL) {
|
|---|
| 295 |
|
|---|
| 296 | /* Out of memory */
|
|---|
| 297 |
|
|---|
| 298 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 299 | }
|
|---|
| 300 | result->gr_mem = (char **)(tst + i);
|
|---|
| 301 |
|
|---|
| 302 | if (gr->num_gr_mem == 0) {
|
|---|
| 303 |
|
|---|
| 304 | /* Group is empty */
|
|---|
| 305 |
|
|---|
| 306 | *(result->gr_mem) = NULL;
|
|---|
| 307 | return NSS_STATUS_SUCCESS;
|
|---|
| 308 | }
|
|---|
| 309 |
|
|---|
| 310 | /* Start looking at extra data */
|
|---|
| 311 |
|
|---|
| 312 | i = 0;
|
|---|
| 313 |
|
|---|
| 314 | while(next_token((char **)&gr_mem, name, ",", sizeof(fstring))) {
|
|---|
| 315 |
|
|---|
| 316 | /* Allocate space for member */
|
|---|
| 317 |
|
|---|
| 318 | if (((result->gr_mem)[i] =
|
|---|
| 319 | get_static(buffer, buflen, strlen(name) + 1)) == NULL) {
|
|---|
| 320 |
|
|---|
| 321 | /* Out of memory */
|
|---|
| 322 |
|
|---|
| 323 | return NSS_STATUS_TRYAGAIN;
|
|---|
| 324 | }
|
|---|
| 325 |
|
|---|
| 326 | strcpy((result->gr_mem)[i], name);
|
|---|
| 327 | i++;
|
|---|
| 328 | }
|
|---|
| 329 |
|
|---|
| 330 | /* Terminate list */
|
|---|
| 331 |
|
|---|
| 332 | (result->gr_mem)[i] = NULL;
|
|---|
| 333 |
|
|---|
| 334 | return NSS_STATUS_SUCCESS;
|
|---|
| 335 | }
|
|---|
| 336 |
|
|---|
| 337 | /*
|
|---|
| 338 | * NSS user functions
|
|---|
| 339 | */
|
|---|
| 340 |
|
|---|
| 341 | static struct winbindd_response getpwent_response;
|
|---|
| 342 |
|
|---|
| 343 | static int ndx_pw_cache; /* Current index into pwd cache */
|
|---|
| 344 | static int num_pw_cache; /* Current size of pwd cache */
|
|---|
| 345 |
|
|---|
| 346 | /* Rewind "file pointer" to start of ntdom password database */
|
|---|
| 347 |
|
|---|
| 348 | NSS_STATUS
|
|---|
| 349 | _nss_winbind_setpwent(void)
|
|---|
| 350 | {
|
|---|
| 351 | NSS_STATUS ret;
|
|---|
| 352 | #ifdef DEBUG_NSS
|
|---|
| 353 | fprintf(stderr, "[%5d]: setpwent\n", getpid());
|
|---|
| 354 | #endif
|
|---|
| 355 |
|
|---|
| 356 | if (num_pw_cache > 0) {
|
|---|
| 357 | ndx_pw_cache = num_pw_cache = 0;
|
|---|
| 358 | free_response(&getpwent_response);
|
|---|
| 359 | }
|
|---|
| 360 |
|
|---|
| 361 | ret = winbindd_request_response(WINBINDD_SETPWENT, NULL, NULL);
|
|---|
| 362 | #ifdef DEBUG_NSS
|
|---|
| 363 | fprintf(stderr, "[%5d]: setpwent returns %s (%d)\n", getpid(),
|
|---|
| 364 | nss_err_str(ret), ret);
|
|---|
| 365 | #endif
|
|---|
| 366 | return ret;
|
|---|
| 367 | }
|
|---|
| 368 |
|
|---|
| 369 | /* Close ntdom password database "file pointer" */
|
|---|
| 370 |
|
|---|
| 371 | NSS_STATUS
|
|---|
| 372 | _nss_winbind_endpwent(void)
|
|---|
| 373 | {
|
|---|
| 374 | NSS_STATUS ret;
|
|---|
| 375 | #ifdef DEBUG_NSS
|
|---|
| 376 | fprintf(stderr, "[%5d]: endpwent\n", getpid());
|
|---|
| 377 | #endif
|
|---|
| 378 |
|
|---|
| 379 | if (num_pw_cache > 0) {
|
|---|
| 380 | ndx_pw_cache = num_pw_cache = 0;
|
|---|
| 381 | free_response(&getpwent_response);
|
|---|
| 382 | }
|
|---|
| 383 |
|
|---|
| 384 | ret = winbindd_request_response(WINBINDD_ENDPWENT, NULL, NULL);
|
|---|
| 385 | #ifdef DEBUG_NSS
|
|---|
| 386 | fprintf(stderr, "[%5d]: endpwent returns %s (%d)\n", getpid(),
|
|---|
| 387 | nss_err_str(ret), ret);
|
|---|
| 388 | #endif
|
|---|
| 389 | return ret;
|
|---|
| 390 | }
|
|---|
| 391 |
|
|---|
| 392 | /* Fetch the next password entry from ntdom password database */
|
|---|
| 393 |
|
|---|
| 394 | NSS_STATUS
|
|---|
| 395 | _nss_winbind_getpwent_r(struct passwd *result, char *buffer,
|
|---|
| 396 | size_t buflen, int *errnop)
|
|---|
| 397 | {
|
|---|
| 398 | NSS_STATUS ret;
|
|---|
| 399 | struct winbindd_request request;
|
|---|
| 400 | static int called_again;
|
|---|
| 401 |
|
|---|
| 402 | #ifdef DEBUG_NSS
|
|---|
| 403 | fprintf(stderr, "[%5d]: getpwent\n", getpid());
|
|---|
| 404 | #endif
|
|---|
| 405 |
|
|---|
| 406 | /* Return an entry from the cache if we have one, or if we are
|
|---|
| 407 | called again because we exceeded our static buffer. */
|
|---|
| 408 |
|
|---|
| 409 | if ((ndx_pw_cache < num_pw_cache) || called_again) {
|
|---|
| 410 | goto return_result;
|
|---|
| 411 | }
|
|---|
| 412 |
|
|---|
| 413 | /* Else call winbindd to get a bunch of entries */
|
|---|
| 414 |
|
|---|
| 415 | if (num_pw_cache > 0) {
|
|---|
| 416 | free_response(&getpwent_response);
|
|---|
| 417 | }
|
|---|
| 418 |
|
|---|
| 419 | ZERO_STRUCT(request);
|
|---|
| 420 | ZERO_STRUCT(getpwent_response);
|
|---|
| 421 |
|
|---|
| 422 | request.data.num_entries = MAX_GETPWENT_USERS;
|
|---|
| 423 |
|
|---|
| 424 | ret = winbindd_request_response(WINBINDD_GETPWENT, &request,
|
|---|
| 425 | &getpwent_response);
|
|---|
| 426 |
|
|---|
| 427 | if (ret == NSS_STATUS_SUCCESS) {
|
|---|
| 428 | struct winbindd_pw *pw_cache;
|
|---|
| 429 |
|
|---|
| 430 | /* Fill cache */
|
|---|
| 431 |
|
|---|
| 432 | ndx_pw_cache = 0;
|
|---|
| 433 | num_pw_cache = getpwent_response.data.num_entries;
|
|---|
| 434 |
|
|---|
| 435 | /* Return a result */
|
|---|
| 436 |
|
|---|
| 437 | return_result:
|
|---|
| 438 |
|
|---|
| 439 | pw_cache = (struct winbindd_pw *)
|
|---|
| 440 | getpwent_response.extra_data.data;
|
|---|
| 441 |
|
|---|
| 442 | /* Check data is valid */
|
|---|
| 443 |
|
|---|
| 444 | if (pw_cache == NULL) {
|
|---|
| 445 | ret = NSS_STATUS_NOTFOUND;
|
|---|
| 446 | goto done;
|
|---|
| 447 | }
|
|---|
| 448 |
|
|---|
| 449 | ret = fill_pwent(result, &pw_cache[ndx_pw_cache],
|
|---|
| 450 | &buffer, &buflen);
|
|---|
| 451 |
|
|---|
| 452 | /* Out of memory - try again */
|
|---|
| 453 |
|
|---|
| 454 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 455 | called_again = True;
|
|---|
| 456 | *errnop = errno = ERANGE;
|
|---|
| 457 | goto done;
|
|---|
| 458 | }
|
|---|
| 459 |
|
|---|
| 460 | *errnop = errno = 0;
|
|---|
| 461 | called_again = False;
|
|---|
| 462 | ndx_pw_cache++;
|
|---|
| 463 |
|
|---|
| 464 | /* If we've finished with this lot of results free cache */
|
|---|
| 465 |
|
|---|
| 466 | if (ndx_pw_cache == num_pw_cache) {
|
|---|
| 467 | ndx_pw_cache = num_pw_cache = 0;
|
|---|
| 468 | free_response(&getpwent_response);
|
|---|
| 469 | }
|
|---|
| 470 | }
|
|---|
| 471 | done:
|
|---|
| 472 | #ifdef DEBUG_NSS
|
|---|
| 473 | fprintf(stderr, "[%5d]: getpwent returns %s (%d)\n", getpid(),
|
|---|
| 474 | nss_err_str(ret), ret);
|
|---|
| 475 | #endif
|
|---|
| 476 | return ret;
|
|---|
| 477 | }
|
|---|
| 478 |
|
|---|
| 479 | /* Return passwd struct from uid */
|
|---|
| 480 |
|
|---|
| 481 | NSS_STATUS
|
|---|
| 482 | _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
|
|---|
| 483 | size_t buflen, int *errnop)
|
|---|
| 484 | {
|
|---|
| 485 | NSS_STATUS ret;
|
|---|
| 486 | static struct winbindd_response response;
|
|---|
| 487 | struct winbindd_request request;
|
|---|
| 488 | static int keep_response=0;
|
|---|
| 489 |
|
|---|
| 490 | #ifdef DEBUG_NSS
|
|---|
| 491 | fprintf(stderr, "[%5d]: getpwuid %d\n", getpid(), (unsigned int)uid);
|
|---|
| 492 | #endif
|
|---|
| 493 |
|
|---|
| 494 | /* If our static buffer needs to be expanded we are called again */
|
|---|
| 495 | if (!keep_response) {
|
|---|
| 496 |
|
|---|
| 497 | /* Call for the first time */
|
|---|
| 498 |
|
|---|
| 499 | ZERO_STRUCT(response);
|
|---|
| 500 | ZERO_STRUCT(request);
|
|---|
| 501 |
|
|---|
| 502 | request.data.uid = uid;
|
|---|
| 503 |
|
|---|
| 504 | ret = winbindd_request_response(WINBINDD_GETPWUID, &request, &response);
|
|---|
| 505 |
|
|---|
| 506 | if (ret == NSS_STATUS_SUCCESS) {
|
|---|
| 507 | ret = fill_pwent(result, &response.data.pw,
|
|---|
| 508 | &buffer, &buflen);
|
|---|
| 509 |
|
|---|
| 510 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 511 | keep_response = True;
|
|---|
| 512 | *errnop = errno = ERANGE;
|
|---|
| 513 | goto done;
|
|---|
| 514 | }
|
|---|
| 515 | }
|
|---|
| 516 |
|
|---|
| 517 | } else {
|
|---|
| 518 |
|
|---|
| 519 | /* We've been called again */
|
|---|
| 520 |
|
|---|
| 521 | ret = fill_pwent(result, &response.data.pw, &buffer, &buflen);
|
|---|
| 522 |
|
|---|
| 523 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 524 | keep_response = True;
|
|---|
| 525 | *errnop = errno = ERANGE;
|
|---|
| 526 | goto done;
|
|---|
| 527 | }
|
|---|
| 528 |
|
|---|
| 529 | keep_response = False;
|
|---|
| 530 | *errnop = errno = 0;
|
|---|
| 531 | }
|
|---|
| 532 |
|
|---|
| 533 | free_response(&response);
|
|---|
| 534 | done:
|
|---|
| 535 |
|
|---|
| 536 | #ifdef DEBUG_NSS
|
|---|
| 537 | fprintf(stderr, "[%5d]: getpwuid %d returns %s (%d)\n", getpid(),
|
|---|
| 538 | (unsigned int)uid, nss_err_str(ret), ret);
|
|---|
| 539 | #endif
|
|---|
| 540 | return ret;
|
|---|
| 541 | }
|
|---|
| 542 |
|
|---|
| 543 | /* Return passwd struct from username */
|
|---|
| 544 | NSS_STATUS
|
|---|
| 545 | _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer,
|
|---|
| 546 | size_t buflen, int *errnop)
|
|---|
| 547 | {
|
|---|
| 548 | NSS_STATUS ret;
|
|---|
| 549 | static struct winbindd_response response;
|
|---|
| 550 | struct winbindd_request request;
|
|---|
| 551 | static int keep_response;
|
|---|
| 552 |
|
|---|
| 553 | #ifdef DEBUG_NSS
|
|---|
| 554 | fprintf(stderr, "[%5d]: getpwnam %s\n", getpid(), name);
|
|---|
| 555 | #endif
|
|---|
| 556 |
|
|---|
| 557 | /* If our static buffer needs to be expanded we are called again */
|
|---|
| 558 |
|
|---|
| 559 | if (!keep_response) {
|
|---|
| 560 |
|
|---|
| 561 | /* Call for the first time */
|
|---|
| 562 |
|
|---|
| 563 | ZERO_STRUCT(response);
|
|---|
| 564 | ZERO_STRUCT(request);
|
|---|
| 565 |
|
|---|
| 566 | strncpy(request.data.username, name,
|
|---|
| 567 | sizeof(request.data.username) - 1);
|
|---|
| 568 | request.data.username
|
|---|
| 569 | [sizeof(request.data.username) - 1] = '\0';
|
|---|
| 570 |
|
|---|
| 571 | ret = winbindd_request_response(WINBINDD_GETPWNAM, &request, &response);
|
|---|
| 572 |
|
|---|
| 573 | if (ret == NSS_STATUS_SUCCESS) {
|
|---|
| 574 | ret = fill_pwent(result, &response.data.pw, &buffer,
|
|---|
| 575 | &buflen);
|
|---|
| 576 |
|
|---|
| 577 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 578 | keep_response = True;
|
|---|
| 579 | *errnop = errno = ERANGE;
|
|---|
| 580 | goto done;
|
|---|
| 581 | }
|
|---|
| 582 | }
|
|---|
| 583 |
|
|---|
| 584 | } else {
|
|---|
| 585 |
|
|---|
| 586 | /* We've been called again */
|
|---|
| 587 |
|
|---|
| 588 | ret = fill_pwent(result, &response.data.pw, &buffer, &buflen);
|
|---|
| 589 |
|
|---|
| 590 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 591 | keep_response = True;
|
|---|
| 592 | *errnop = errno = ERANGE;
|
|---|
| 593 | goto done;
|
|---|
| 594 | }
|
|---|
| 595 |
|
|---|
| 596 | keep_response = False;
|
|---|
| 597 | *errnop = errno = 0;
|
|---|
| 598 | }
|
|---|
| 599 |
|
|---|
| 600 | free_response(&response);
|
|---|
| 601 | done:
|
|---|
| 602 | #ifdef DEBUG_NSS
|
|---|
| 603 | fprintf(stderr, "[%5d]: getpwnam %s returns %s (%d)\n", getpid(),
|
|---|
| 604 | name, nss_err_str(ret), ret);
|
|---|
| 605 | #endif
|
|---|
| 606 | return ret;
|
|---|
| 607 | }
|
|---|
| 608 |
|
|---|
| 609 | /*
|
|---|
| 610 | * NSS group functions
|
|---|
| 611 | */
|
|---|
| 612 |
|
|---|
| 613 | static struct winbindd_response getgrent_response;
|
|---|
| 614 |
|
|---|
| 615 | static int ndx_gr_cache; /* Current index into grp cache */
|
|---|
| 616 | static int num_gr_cache; /* Current size of grp cache */
|
|---|
| 617 |
|
|---|
| 618 | /* Rewind "file pointer" to start of ntdom group database */
|
|---|
| 619 |
|
|---|
| 620 | NSS_STATUS
|
|---|
| 621 | _nss_winbind_setgrent(void)
|
|---|
| 622 | {
|
|---|
| 623 | NSS_STATUS ret;
|
|---|
| 624 | #ifdef DEBUG_NSS
|
|---|
| 625 | fprintf(stderr, "[%5d]: setgrent\n", getpid());
|
|---|
| 626 | #endif
|
|---|
| 627 |
|
|---|
| 628 | if (num_gr_cache > 0) {
|
|---|
| 629 | ndx_gr_cache = num_gr_cache = 0;
|
|---|
| 630 | free_response(&getgrent_response);
|
|---|
| 631 | }
|
|---|
| 632 |
|
|---|
| 633 | ret = winbindd_request_response(WINBINDD_SETGRENT, NULL, NULL);
|
|---|
| 634 | #ifdef DEBUG_NSS
|
|---|
| 635 | fprintf(stderr, "[%5d]: setgrent returns %s (%d)\n", getpid(),
|
|---|
| 636 | nss_err_str(ret), ret);
|
|---|
| 637 | #endif
|
|---|
| 638 | return ret;
|
|---|
| 639 | }
|
|---|
| 640 |
|
|---|
| 641 | /* Close "file pointer" for ntdom group database */
|
|---|
| 642 |
|
|---|
| 643 | NSS_STATUS
|
|---|
| 644 | _nss_winbind_endgrent(void)
|
|---|
| 645 | {
|
|---|
| 646 | NSS_STATUS ret;
|
|---|
| 647 | #ifdef DEBUG_NSS
|
|---|
| 648 | fprintf(stderr, "[%5d]: endgrent\n", getpid());
|
|---|
| 649 | #endif
|
|---|
| 650 |
|
|---|
| 651 | if (num_gr_cache > 0) {
|
|---|
| 652 | ndx_gr_cache = num_gr_cache = 0;
|
|---|
| 653 | free_response(&getgrent_response);
|
|---|
| 654 | }
|
|---|
| 655 |
|
|---|
| 656 | ret = winbindd_request_response(WINBINDD_ENDGRENT, NULL, NULL);
|
|---|
| 657 | #ifdef DEBUG_NSS
|
|---|
| 658 | fprintf(stderr, "[%5d]: endgrent returns %s (%d)\n", getpid(),
|
|---|
| 659 | nss_err_str(ret), ret);
|
|---|
| 660 | #endif
|
|---|
| 661 | return ret;
|
|---|
| 662 | }
|
|---|
| 663 |
|
|---|
| 664 | /* Get next entry from ntdom group database */
|
|---|
| 665 |
|
|---|
| 666 | static NSS_STATUS
|
|---|
| 667 | winbind_getgrent(enum winbindd_cmd cmd,
|
|---|
| 668 | struct group *result,
|
|---|
| 669 | char *buffer, size_t buflen, int *errnop)
|
|---|
| 670 | {
|
|---|
| 671 | NSS_STATUS ret;
|
|---|
| 672 | static struct winbindd_request request;
|
|---|
| 673 | static int called_again;
|
|---|
| 674 |
|
|---|
| 675 |
|
|---|
| 676 | #ifdef DEBUG_NSS
|
|---|
| 677 | fprintf(stderr, "[%5d]: getgrent\n", getpid());
|
|---|
| 678 | #endif
|
|---|
| 679 |
|
|---|
| 680 | /* Return an entry from the cache if we have one, or if we are
|
|---|
| 681 | called again because we exceeded our static buffer. */
|
|---|
| 682 |
|
|---|
| 683 | if ((ndx_gr_cache < num_gr_cache) || called_again) {
|
|---|
| 684 | goto return_result;
|
|---|
| 685 | }
|
|---|
| 686 |
|
|---|
| 687 | /* Else call winbindd to get a bunch of entries */
|
|---|
| 688 |
|
|---|
| 689 | if (num_gr_cache > 0) {
|
|---|
| 690 | free_response(&getgrent_response);
|
|---|
| 691 | }
|
|---|
| 692 |
|
|---|
| 693 | ZERO_STRUCT(request);
|
|---|
| 694 | ZERO_STRUCT(getgrent_response);
|
|---|
| 695 |
|
|---|
| 696 | request.data.num_entries = MAX_GETGRENT_USERS;
|
|---|
| 697 |
|
|---|
| 698 | ret = winbindd_request_response(cmd, &request,
|
|---|
| 699 | &getgrent_response);
|
|---|
| 700 |
|
|---|
| 701 | if (ret == NSS_STATUS_SUCCESS) {
|
|---|
| 702 | struct winbindd_gr *gr_cache;
|
|---|
| 703 | int mem_ofs;
|
|---|
| 704 |
|
|---|
| 705 | /* Fill cache */
|
|---|
| 706 |
|
|---|
| 707 | ndx_gr_cache = 0;
|
|---|
| 708 | num_gr_cache = getgrent_response.data.num_entries;
|
|---|
| 709 |
|
|---|
| 710 | /* Return a result */
|
|---|
| 711 |
|
|---|
| 712 | return_result:
|
|---|
| 713 |
|
|---|
| 714 | gr_cache = (struct winbindd_gr *)
|
|---|
| 715 | getgrent_response.extra_data.data;
|
|---|
| 716 |
|
|---|
| 717 | /* Check data is valid */
|
|---|
| 718 |
|
|---|
| 719 | if (gr_cache == NULL) {
|
|---|
| 720 | ret = NSS_STATUS_NOTFOUND;
|
|---|
| 721 | goto done;
|
|---|
| 722 | }
|
|---|
| 723 |
|
|---|
| 724 | /* Fill group membership. The offset into the extra data
|
|---|
| 725 | for the group membership is the reported offset plus the
|
|---|
| 726 | size of all the winbindd_gr records returned. */
|
|---|
| 727 |
|
|---|
| 728 | mem_ofs = gr_cache[ndx_gr_cache].gr_mem_ofs +
|
|---|
| 729 | num_gr_cache * sizeof(struct winbindd_gr);
|
|---|
| 730 |
|
|---|
| 731 | ret = fill_grent(result, &gr_cache[ndx_gr_cache],
|
|---|
| 732 | ((char *)getgrent_response.extra_data.data)+mem_ofs,
|
|---|
| 733 | &buffer, &buflen);
|
|---|
| 734 |
|
|---|
| 735 | /* Out of memory - try again */
|
|---|
| 736 |
|
|---|
| 737 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 738 | called_again = True;
|
|---|
| 739 | *errnop = errno = ERANGE;
|
|---|
| 740 | goto done;
|
|---|
| 741 | }
|
|---|
| 742 |
|
|---|
| 743 | *errnop = 0;
|
|---|
| 744 | called_again = False;
|
|---|
| 745 | ndx_gr_cache++;
|
|---|
| 746 |
|
|---|
| 747 | /* If we've finished with this lot of results free cache */
|
|---|
| 748 |
|
|---|
| 749 | if (ndx_gr_cache == num_gr_cache) {
|
|---|
| 750 | ndx_gr_cache = num_gr_cache = 0;
|
|---|
| 751 | free_response(&getgrent_response);
|
|---|
| 752 | }
|
|---|
| 753 | }
|
|---|
| 754 | done:
|
|---|
| 755 | #ifdef DEBUG_NSS
|
|---|
| 756 | fprintf(stderr, "[%5d]: getgrent returns %s (%d)\n", getpid(),
|
|---|
| 757 | nss_err_str(ret), ret);
|
|---|
| 758 | #endif
|
|---|
| 759 | return ret;
|
|---|
| 760 | }
|
|---|
| 761 |
|
|---|
| 762 |
|
|---|
| 763 | NSS_STATUS
|
|---|
| 764 | _nss_winbind_getgrent_r(struct group *result,
|
|---|
| 765 | char *buffer, size_t buflen, int *errnop)
|
|---|
| 766 | {
|
|---|
| 767 | return winbind_getgrent(WINBINDD_GETGRENT, result, buffer, buflen, errnop);
|
|---|
| 768 | }
|
|---|
| 769 |
|
|---|
| 770 | NSS_STATUS
|
|---|
| 771 | _nss_winbind_getgrlst_r(struct group *result,
|
|---|
| 772 | char *buffer, size_t buflen, int *errnop)
|
|---|
| 773 | {
|
|---|
| 774 | return winbind_getgrent(WINBINDD_GETGRLST, result, buffer, buflen, errnop);
|
|---|
| 775 | }
|
|---|
| 776 |
|
|---|
| 777 | /* Return group struct from group name */
|
|---|
| 778 |
|
|---|
| 779 | NSS_STATUS
|
|---|
| 780 | _nss_winbind_getgrnam_r(const char *name,
|
|---|
| 781 | struct group *result, char *buffer,
|
|---|
| 782 | size_t buflen, int *errnop)
|
|---|
| 783 | {
|
|---|
| 784 | NSS_STATUS ret;
|
|---|
| 785 | static struct winbindd_response response;
|
|---|
| 786 | struct winbindd_request request;
|
|---|
| 787 | static int keep_response;
|
|---|
| 788 |
|
|---|
| 789 | #ifdef DEBUG_NSS
|
|---|
| 790 | fprintf(stderr, "[%5d]: getgrnam %s\n", getpid(), name);
|
|---|
| 791 | #endif
|
|---|
| 792 |
|
|---|
| 793 | /* If our static buffer needs to be expanded we are called again */
|
|---|
| 794 |
|
|---|
| 795 | if (!keep_response) {
|
|---|
| 796 |
|
|---|
| 797 | /* Call for the first time */
|
|---|
| 798 |
|
|---|
| 799 | ZERO_STRUCT(request);
|
|---|
| 800 | ZERO_STRUCT(response);
|
|---|
| 801 |
|
|---|
| 802 | strncpy(request.data.groupname, name,
|
|---|
| 803 | sizeof(request.data.groupname));
|
|---|
| 804 | request.data.groupname
|
|---|
| 805 | [sizeof(request.data.groupname) - 1] = '\0';
|
|---|
| 806 |
|
|---|
| 807 | ret = winbindd_request_response(WINBINDD_GETGRNAM, &request, &response);
|
|---|
| 808 |
|
|---|
| 809 | if (ret == NSS_STATUS_SUCCESS) {
|
|---|
| 810 | ret = fill_grent(result, &response.data.gr,
|
|---|
| 811 | (char *)response.extra_data.data,
|
|---|
| 812 | &buffer, &buflen);
|
|---|
| 813 |
|
|---|
| 814 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 815 | keep_response = True;
|
|---|
| 816 | *errnop = errno = ERANGE;
|
|---|
| 817 | goto done;
|
|---|
| 818 | }
|
|---|
| 819 | }
|
|---|
| 820 |
|
|---|
| 821 | } else {
|
|---|
| 822 |
|
|---|
| 823 | /* We've been called again */
|
|---|
| 824 |
|
|---|
| 825 | ret = fill_grent(result, &response.data.gr,
|
|---|
| 826 | (char *)response.extra_data.data, &buffer,
|
|---|
| 827 | &buflen);
|
|---|
| 828 |
|
|---|
| 829 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 830 | keep_response = True;
|
|---|
| 831 | *errnop = errno = ERANGE;
|
|---|
| 832 | goto done;
|
|---|
| 833 | }
|
|---|
| 834 |
|
|---|
| 835 | keep_response = False;
|
|---|
| 836 | *errnop = 0;
|
|---|
| 837 | }
|
|---|
| 838 |
|
|---|
| 839 | free_response(&response);
|
|---|
| 840 | done:
|
|---|
| 841 | #ifdef DEBUG_NSS
|
|---|
| 842 | fprintf(stderr, "[%5d]: getgrnam %s returns %s (%d)\n", getpid(),
|
|---|
| 843 | name, nss_err_str(ret), ret);
|
|---|
| 844 | #endif
|
|---|
| 845 | return ret;
|
|---|
| 846 | }
|
|---|
| 847 |
|
|---|
| 848 | /* Return group struct from gid */
|
|---|
| 849 |
|
|---|
| 850 | NSS_STATUS
|
|---|
| 851 | _nss_winbind_getgrgid_r(gid_t gid,
|
|---|
| 852 | struct group *result, char *buffer,
|
|---|
| 853 | size_t buflen, int *errnop)
|
|---|
| 854 | {
|
|---|
| 855 | NSS_STATUS ret;
|
|---|
| 856 | static struct winbindd_response response;
|
|---|
| 857 | struct winbindd_request request;
|
|---|
| 858 | static int keep_response;
|
|---|
| 859 |
|
|---|
| 860 | #ifdef DEBUG_NSS
|
|---|
| 861 | fprintf(stderr, "[%5d]: getgrgid %d\n", getpid(), gid);
|
|---|
| 862 | #endif
|
|---|
| 863 |
|
|---|
| 864 | /* If our static buffer needs to be expanded we are called again */
|
|---|
| 865 |
|
|---|
| 866 | if (!keep_response) {
|
|---|
| 867 |
|
|---|
| 868 | /* Call for the first time */
|
|---|
| 869 |
|
|---|
| 870 | ZERO_STRUCT(request);
|
|---|
| 871 | ZERO_STRUCT(response);
|
|---|
| 872 |
|
|---|
| 873 | request.data.gid = gid;
|
|---|
| 874 |
|
|---|
| 875 | ret = winbindd_request_response(WINBINDD_GETGRGID, &request, &response);
|
|---|
| 876 |
|
|---|
| 877 | if (ret == NSS_STATUS_SUCCESS) {
|
|---|
| 878 |
|
|---|
| 879 | ret = fill_grent(result, &response.data.gr,
|
|---|
| 880 | (char *)response.extra_data.data,
|
|---|
| 881 | &buffer, &buflen);
|
|---|
| 882 |
|
|---|
| 883 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 884 | keep_response = True;
|
|---|
| 885 | *errnop = errno = ERANGE;
|
|---|
| 886 | goto done;
|
|---|
| 887 | }
|
|---|
| 888 | }
|
|---|
| 889 |
|
|---|
| 890 | } else {
|
|---|
| 891 |
|
|---|
| 892 | /* We've been called again */
|
|---|
| 893 |
|
|---|
| 894 | ret = fill_grent(result, &response.data.gr,
|
|---|
| 895 | (char *)response.extra_data.data, &buffer,
|
|---|
| 896 | &buflen);
|
|---|
| 897 |
|
|---|
| 898 | if (ret == NSS_STATUS_TRYAGAIN) {
|
|---|
| 899 | keep_response = True;
|
|---|
| 900 | *errnop = errno = ERANGE;
|
|---|
| 901 | goto done;
|
|---|
| 902 | }
|
|---|
| 903 |
|
|---|
| 904 | keep_response = False;
|
|---|
| 905 | *errnop = 0;
|
|---|
| 906 | }
|
|---|
| 907 |
|
|---|
| 908 | free_response(&response);
|
|---|
| 909 | done:
|
|---|
| 910 | #ifdef DEBUG_NSS
|
|---|
| 911 | fprintf(stderr, "[%5d]: getgrgid %d returns %s (%d)\n", getpid(),
|
|---|
| 912 | (unsigned int)gid, nss_err_str(ret), ret);
|
|---|
| 913 | #endif
|
|---|
| 914 | return ret;
|
|---|
| 915 | }
|
|---|
| 916 |
|
|---|
| 917 | /* Initialise supplementary groups */
|
|---|
| 918 |
|
|---|
| 919 | NSS_STATUS
|
|---|
| 920 | _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
|
|---|
| 921 | long int *size, gid_t **groups, long int limit,
|
|---|
| 922 | int *errnop)
|
|---|
| 923 | {
|
|---|
| 924 | NSS_STATUS ret;
|
|---|
| 925 | struct winbindd_request request;
|
|---|
| 926 | struct winbindd_response response;
|
|---|
| 927 | int i;
|
|---|
| 928 |
|
|---|
| 929 | #ifdef DEBUG_NSS
|
|---|
| 930 | fprintf(stderr, "[%5d]: initgroups %s (%d)\n", getpid(),
|
|---|
| 931 | user, group);
|
|---|
| 932 | #endif
|
|---|
| 933 |
|
|---|
| 934 | ZERO_STRUCT(request);
|
|---|
| 935 | ZERO_STRUCT(response);
|
|---|
| 936 |
|
|---|
|
|---|