Lines Matching refs:uid
52 remember what uid we got started as - this allows us to run correctly
68 some code (eg. winbindd) needs to know what uid we started as
92 abort if we haven't set the uid correctly
99 DEBUG(0,("Failed to set uid privileges to (%d,%d) now set to (%d,%d)\n",
102 smb_panic("failed to set uid\n");
116 DEBUG(0,("Failed to set gid privileges to (%d,%d) now set to (%d,%d) uid=(%d,%d)\n",
186 Set effective uid, and possibly the real uid too.
189 ruid==uid and euid==uid
193 ruid==0 and euid==uid
197 void set_effective_uid(uid_t uid)
200 /* Set the effective as well as the real uid. */
201 if (setresuid(uid,uid,-1) == -1) {
203 DEBUG(0, ("setresuid failed with EAGAIN. uid(%d) "
205 (int)uid));
211 setreuid(-1,uid);
215 seteuid(uid);
219 setuidx(ID_EFFECTIVE, uid);
222 assert_uid(-1, uid);
254 save the real and effective uid for later restoration. Used by the quotas
329 set the real AND effective uid to the current effective uid in a way that
335 uid_t uid = geteuid();
343 setreuid(uid, -1);
344 setreuid(-1, uid);
357 assert_uid(uid, uid);
363 Become the specified uid and gid - permanently !
366 void become_user_permanently(uid_t uid, gid_t gid)
379 setresuid(uid,uid,uid);
380 setuid(uid);
386 setreuid(uid,uid);
387 setuid(uid);
393 setuid(uid);
394 seteuid(uid);
395 setuid(uid);
402 setuidx(ID_REAL, uid);
403 setuidx(ID_EFFECTIVE, uid);
404 setuid(uid);
407 assert_uid(uid, uid);
467 fprintf(stderr,"uid not set permanently\n");