Fixed the bug password cannot be changed from a client.

PR:		ports/61662
Submitted by:	NAKAJI Hiroyuki <nakaji@jp.freebsd.org>
This commit is contained in:
Munechika SUMIKAWA 2004-01-30 10:39:58 +00:00
parent 253cf23efa
commit 102f9e5ac4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=99491
2 changed files with 27 additions and 1 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= samba
PORTVERSION= ${SAMBA_VERSION}.j${SAMBA_JA_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= japanese net
MASTER_SITES= ftp://ftp.samba.gr.jp/pub/samba-jp/%SUBDIR%/ \
ftp://ftp.iij.ad.jp/pub/SAMBA/samba-jp/%SUBDIR%/ \

View file

@ -0,0 +1,26 @@
Index: lib/util_sec.c
===================================================================
RCS file: /project/cvs/samba22-ja/source/lib/util_sec.c,v
retrieving revision 1.4
diff -u -r1.4 util_sec.c
--- lib/util_sec.c 21 Nov 2002 12:53:49 -0000 1.4
+++ lib/util_sec.c 21 Jan 2004 01:31:37 -0000
@@ -283,6 +283,10 @@
void restore_re_gid(void)
{
+ uid_t uid = geteuid();
+
+ set_effective_uid(0);
+
#if USE_SETRESUID
setresgid(saved_rgid, saved_egid, -1);
#elif USE_SETREUID
@@ -298,6 +302,7 @@
set_effective_gid(saved_egid);
#endif
+ set_effective_uid(uid);
assert_gid(saved_rgid, saved_egid);
}