The Samba-Bugzilla – Attachment 8355 Details for
Bug 9510
Make use of posix_openpty() for UNIX password changing code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make use of posix_openpt()
samba_posix_openpt.diff (text/plain), 1.22 KB, created by
Brad Smith
on 2012-12-18 01:53:17 UTC
(
hide
)
Description:
Make use of posix_openpt()
Filename:
MIME Type:
Creator:
Brad Smith
Created:
2012-12-18 01:53:17 UTC
Size:
1.22 KB
patch
obsolete
>diff --git a/source3/configure.in b/source3/configure.in >index bd3bffe..3591131 100644 >--- a/source3/configure.in >+++ b/source3/configure.in >@@ -970,7 +970,7 @@ AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetg > AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf) > AC_CHECK_FUNCS(getgrset) > AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups syscall sysconf) >-AC_CHECK_FUNCS(atexit grantpt posix_fallocate) >+AC_CHECK_FUNCS(atexit grantpt posix_openpt posix_fallocate) > AC_CHECK_FUNCS(fallocate) > AC_CHECK_FUNCS(fseeko setluid getpwanam) > AC_CHECK_FUNCS(fdopendir) >diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c >index 51c0d0f..532da7f 100644 >--- a/source3/rpc_server/samr/srv_samr_chgpasswd.c >+++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c >@@ -73,8 +73,12 @@ static int findpty(char **slave) > *slave = NULL; > > #if defined(HAVE_GRANTPT) >+#if defined(HAVE_POSIX_OPENPT) >+ if ((master = posix_openpt(O_RDWR|O_NOCTTY)) >= 0) { >+#else > /* Try to open /dev/ptmx. If that fails, fall through to old method. */ > if ((master = open("/dev/ptmx", O_RDWR, 0)) >= 0) { >+#endif > grantpt(master); > unlockpt(master); > line = (char *)ptsname(master);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9510
: 8355