Lines Matching defs:rc

68     int rc = 0;
84 rc = ENOMEM;
88 rc = sss_nss_mc_getpwnam(name, len, &pwd, buf, buflen);
89 } while (rc == ERANGE);
91 if (rc == 0) {
100 return rc;
105 int rc = 0;
121 rc = ENOMEM;
125 rc = sss_nss_mc_getgrnam(name, len, &grp, buf, buflen);
126 } while (rc == ERANGE);
128 if (rc == 0) {
137 return rc;
142 int rc;
156 rc = ENOMEM;
160 rc = sss_nss_mc_getpwuid(uid, &pwd, buf, buflen);
161 } while (rc == ERANGE);
163 if (rc == 0) {
168 rc = ENOBUFS;
178 return rc;
183 int rc;
197 rc = ENOMEM;
201 rc = sss_nss_mc_getgrgid(gid, &grp, buf, buflen);
202 } while (rc == ERANGE);
204 if (rc == 0) {
209 rc = ENOBUFS;
219 return rc;
225 int rc;
232 rc = send_recv(&rep, &rep_len, cmd, name, name_len + 1);
233 if (rc == 0) {
234 rc = reply_to_id(id, rep, rep_len);
239 return rc;
245 int rc;
252 rc = send_recv(&rep, &rep_len, cmd, &req, req_len);
253 if (rc == 0) {
254 rc = reply_to_name(name, len, rep, rep_len);
259 return rc;
290 int rc = 0;
296 rc = EBADMSG;
303 rc = EBADMSG;
307 rc = ENOENT;
313 rc = EBADMSG;
321 return rc;
326 int rc = 0;
334 rc = EBADMSG;
341 rc = EBADMSG;
345 rc = ENOENT;
351 rc = EBADMSG;
358 rc = sss_readrep_copy_string(buf, &offset, &buf_len, &len, &name, NULL);
359 if (rc != 0) {
360 rc = -rc;
364 return rc;
410 int normalise_rc(int rc) {
413 res = rc;
421 /* log the actual rc from our code (to be used before normalising the rc) */
422 void log_actual_rc(const char *trans_name, int rc) {
424 IDMAP_LOG(1, ("%s: rc=%i msg=%s", trans_name, rc,
425 strerror_r(rc, tmp, sizeof(tmp))));
449 int rc;
461 rc = sss_strnlen(name, SSS_NAME_MAX, &name_len);
462 if (rc != 0) {
463 IDMAP_LOG(0, ("%s: no-strnlen; rc=%i", __func__, rc));
464 return -rc;
467 rc = get_uid_from_mc(uid, name);
468 if (rc != 0) {
469 rc = name_to_id(name, uid, SSS_NSS_GETPWNAM);
472 log_actual_rc(__func__, rc);
473 rc = normalise_rc(rc);
475 return -rc;
480 int rc;
492 rc = sss_strnlen(name, SSS_NAME_MAX, &name_len);
493 if (rc != 0) {
494 IDMAP_LOG(0, ("%s: no-strnlen; rc=%i", __func__, rc));
495 return -rc;
498 rc = get_gid_from_mc(gid, name);
499 if (rc != 0) {
500 rc = name_to_id(name, gid, SSS_NSS_GETGRNAM);
503 log_actual_rc(__func__, rc);
504 rc = normalise_rc(rc);
506 return -rc;
511 int rc;
518 rc = get_user_from_mc(name, len, uid);
519 if (rc != 0) {
520 rc = id_to_name(name, len, uid, SSS_NSS_GETPWUID);
523 log_actual_rc(__func__, rc);
524 rc = normalise_rc(rc);
526 return -rc;
531 int rc;
538 rc = get_group_from_mc(name, len, gid);
539 if (rc != 0) {
540 rc = id_to_name(name, len, gid, SSS_NSS_GETGRGID);
543 log_actual_rc(__func__, rc);
544 rc = normalise_rc(rc);
546 return -rc;