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

Return to ticket 9978