View | Details | Raw Unified | Return to ticket 9978 | Differences between
and this patch

Collapse All | Expand All

(-)a/contribs/nss_slurm/libnss_slurm.c (-2 / +30 lines)
Lines 129-134 static struct passwd *_pw_internal(int mode, uid_t uid, const char *name) Link Here
129
129
130
	if (_load_config())
130
	if (_load_config())
131
		return NULL;
131
		return NULL;
132
133
	fprintf(stderr, "%s: uid:%d name:%s\n", __func__, uid, name);
134
132
	/*
135
	/*
133
	 * Both arguments to stepd_available() must be provided, otherwise
136
	 * Both arguments to stepd_available() must be provided, otherwise
134
	 * it will internally try to load the Slurm config to sort it out.
137
	 * it will internally try to load the Slurm config to sort it out.
Lines 148-156 static struct passwd *_pw_internal(int mode, uid_t uid, const char *name) Link Here
148
151
149
		pwd = stepd_getpw(fd, stepd->protocol_version, mode, uid, name);
152
		pwd = stepd_getpw(fd, stepd->protocol_version, mode, uid, name);
150
		close(fd);
153
		close(fd);
151
		if (pwd)
154
		if (pwd) {
155
			fprintf(stderr, "%s: user %s(%d) found in Job:%d Step:%d\n",
156
				__func__, pwd->pw_name, pwd->pw_uid,
157
				stepd->step_id.job_id, stepd->step_id.step_id);
152
			break;
158
			break;
159
		} else
160
			fprintf(stderr,
161
				"%s: user %s(%d) not found in Job:%d Step:%d\n",
162
				__func__, name, uid, stepd->step_id.job_id,
163
				stepd->step_id.step_id);
153
	}
164
	}
165
	if (!pwd)
166
		fprintf(stderr, "%s: could not find %s(%d) in any step\n",
167
			__func__, name, uid);
154
	list_iterator_destroy(itr);
168
	list_iterator_destroy(itr);
155
	FREE_NULL_LIST(steps);
169
	FREE_NULL_LIST(steps);
156
170
Lines 260-265 static struct group **_gr_internal(int mode, gid_t gid, const char *name) Link Here
260
274
261
	if (_load_config())
275
	if (_load_config())
262
		return NULL;
276
		return NULL;
277
278
	fprintf(stderr, "%s: gid:%d name:%s\n", __func__, gid, name);
279
263
	/*
280
	/*
264
	 * Both arguments to stepd_available() must be provided, otherwise
281
	 * Both arguments to stepd_available() must be provided, otherwise
265
	 * it will internally try to load the Slurm config to sort it out.
282
	 * it will internally try to load the Slurm config to sort it out.
Lines 280-288 static struct group **_gr_internal(int mode, gid_t gid, const char *name) Link Here
280
		grps = stepd_getgr(fd, stepd->protocol_version, mode, gid,
297
		grps = stepd_getgr(fd, stepd->protocol_version, mode, gid,
281
				   name);
298
				   name);
282
		close(fd);
299
		close(fd);
283
		if (grps)
300
		if (grps) {
301
			fprintf(stderr, "%s: groups found in Job:%d Step:%d\n",
302
				__func__, stepd->step_id.job_id,
303
				stepd->step_id.step_id);
284
			break;
304
			break;
305
		} else
306
			fprintf(stderr,
307
				"%s: no groups found in Job:%d Step:%d\n",
308
				__func__, stepd->step_id.job_id,
309
				stepd->step_id.step_id);
285
	}
310
	}
311
	if (!grps)
312
		fprintf(stderr, "%s: could not find groups in any step\n",
313
			__func__);
286
	list_iterator_destroy(itr);
314
	list_iterator_destroy(itr);
287
	FREE_NULL_LIST(steps);
315
	FREE_NULL_LIST(steps);
288
316

Return to ticket 9978