dovecot: Use authunix_create_default() with rquota. Patch by Ste...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 6 19:07:40 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/0f6d4f8dd587
changeset: 6176:0f6d4f8dd587
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 06 18:25:30 2007 +0300
description:
Use authunix_create_default() with rquota. Patch by Steven Luo.

diffstat:

1 file changed, 5 insertions(+)
src/plugins/quota/quota-fs.c |    5 +++++

diffs (22 lines):

diff -r 6c3788e03f7e -r 0f6d4f8dd587 src/plugins/quota/quota-fs.c
--- a/src/plugins/quota/quota-fs.c	Mon Aug 06 18:24:11 2007 +0300
+++ b/src/plugins/quota/quota-fs.c	Mon Aug 06 18:25:30 2007 +0300
@@ -231,6 +231,10 @@ static int do_rquota(struct fs_quota_roo
 		return -1;
 	}
 
+	/* Establish some RPC credentials */
+	auth_destroy(cl->cl_auth);
+	cl->cl_auth = authunix_create_default();
+
 	/* make the rquota call on the remote host */
 	args.gqa_pathp = path;
 	args.gqa_uid = root->uid;
@@ -243,6 +247,7 @@ static int do_rquota(struct fs_quota_roo
 				timeout);
 	
 	/* the result has been deserialized, let the client go */
+	auth_destroy(cl->cl_auth);
 	clnt_destroy(cl);
 
 	if (call_status != RPC_SUCCESS) {


More information about the dovecot-cvs mailing list