no valid_user_struct ?

Gerald (Jerry) Carter jerry at samba.org
Tue Aug 24 15:47:37 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can anyone give me a case where the false branch in
printing.c:is_owner() would be a valid code path ?
I'm trying to remember how we could have a current_user
{} struct but no valid_user_struct {}.  Right now my
brain has dropped this out for lack a space.


static BOOL is_owner(struct current_user *user, int snum, uint32 jobid)
{
	struct printjob *pjob = print_job_find(snum, jobid);
	user_struct *vuser;

	if (!pjob || !user)
		return False;

	if ((vuser = get_valid_user_struct(user->vuid)) != NULL) {
		return strequal_unix(pjob->user, vuser->user.smb_name);
	} else {
		return strequal_unix(pjob->user, uidtoname(user->uid));
	}
}





ciao, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBK2MZIR7qMdg1EfYRAiJHAKCncV0yl82SG8mPr8EaaZiSMhywJACfUoXy
ukOf22kVdNpm5Nb+aVn3XKk=
=/ZVx
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list