xorgproto: fixes for _Xpw_copyPasswd()

This commit is contained in:
Leonid Pliushch 2019-06-29 23:33:21 +03:00 committed by Yaksh Bariya
parent 82a01a8efd
commit 86b09ea2fc
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
diff -uNr xorgproto-2019.1/include/X11/Xos_r.h xorgproto-2019.1.mod/include/X11/Xos_r.h
--- xorgproto-2019.1/include/X11/Xos_r.h 2019-06-20 06:13:03.000000000 +0300
+++ xorgproto-2019.1.mod/include/X11/Xos_r.h 2019-06-29 23:32:10.617173769 +0300
@@ -248,7 +248,7 @@
*/
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
- defined(__APPLE__) || defined(__DragonFly__)
+ defined(__APPLE__) || defined(__DragonFly__) || defined(__ANDROID__)
static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
{
memcpy(&(p).pws, (p).pwp, sizeof(struct passwd));
@@ -261,11 +261,7 @@
(p).len = strlen((p).pwp->pw_passwd);
strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd);
- (p).pws.pw_class = (p).pws.pw_passwd + (p).len + 1;
- (p).len = strlen((p).pwp->pw_class);
- strcpy((p).pws.pw_class, (p).pwp->pw_class);
-
- (p).pws.pw_gecos = (p).pws.pw_class + (p).len + 1;
+ (p).pws.pw_gecos = (p).pws.pw_passwd + (p).len + 1;
(p).len = strlen((p).pwp->pw_gecos);
strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos);