diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 2 | ||||
-rw-r--r-- | source3/rpc_server/samr/srv_samr_chgpasswd.c | 4 | ||||
-rw-r--r-- | source3/wscript | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/source3/configure.in b/source3/configure.in index bd3bffe390..359113143b 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 3d04899a53..db1f459c8d 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) + master = posix_openpt(O_RDWR|O_NOCTTY); +#else /* Try to open /dev/ptmx. If that fails, fall through to old method. */ master = open("/dev/ptmx", O_RDWR, 0); +#endif if (master >= 0) { grantpt(master); unlockpt(master); diff --git a/source3/wscript b/source3/wscript index 9a1cd684fd..50787165f2 100644 --- a/source3/wscript +++ b/source3/wscript @@ -81,7 +81,7 @@ def configure(conf): conf.CHECK_FUNCS('sigprocmask sigblock sigaction sigset innetgr') conf.CHECK_FUNCS('initgroups select poll rdchk getgrnam getgrent pathconf') conf.CHECK_FUNCS('setpriv setgidx setuidx setgroups syscall sysconf') - conf.CHECK_FUNCS('atexit grantpt fallocate posix_fallocate') + conf.CHECK_FUNCS('atexit grantpt posix_openpt fallocate posix_fallocate') conf.CHECK_FUNCS('fseeko setluid') conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h') conf.CHECK_FUNCS('fdopendir') |