Date: Tue, 15 Mar 2016 18:07:30 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 208036] courier-authlib-base - password change expect script does not work Message-ID: <bug-208036-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208036 Bug ID: 208036 Summary: courier-authlib-base - password change expect script does not work Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: jay-fbbu@g-cipher.net I am using 10.2-RELEASE-p13 and we have a legacy e-mail system where user accounts are set up in /etc/password.=20=20=20 After installing the courierpassd port, we could not get password changes to work. After some investigation it turns out that the problem was within an expect script that the authdaemond program installed with courier-authlib-b= ase uses. courier-authlib-base installs an expect script that the authdaemon uses to change a user password: /usr/local/libexec/courier-authlib/authsystem.passwd Running the script manually demonstrates the problem: [root@pe710 ~]# /usr/local/libexec/courier-authlib/authsystem.passwd env: expect -f: No such file or directory [root@pe710 ~]# head -1 /usr/local/libexec/courier-authlib/authsystem.passwd #! /usr/bin/env expect -f root@pe710 ~]# env expect -f expect: option requires an argument -- f usage: expect [-div] [-c cmds] [[-f] cmdfile] [args] [root@pe710 ~]#=20 Solution: Removing the -f option to "expect" allows this script (and courierpassd) to work. Here is what the failure looks like in ktrace: 44868 authdaemond GIO fd 7 wrote 8 bytes "foo bar " 44881 authdaemond RET close 0 44868 authdaemond RET write 8 44881 authdaemond CALL openat(AT_FDCWD,0x800a31353,0x1<O_WRONLY>,<unused>= 0) 44868 authdaemond CALL close(0x7) 44881 authdaemond NAMI "/dev/null" 44868 authdaemond RET close 0 44881 authdaemond RET openat 1 44868 authdaemond CALL close(0x7) 44881 authdaemond CALL dup2(0x1,0x2) 44868 authdaemond RET close -1 errno 9 Bad file descriptor 44881 authdaemond RET dup2 2 44868 authdaemond CALL wait4(0xffffffff,0x7fffffffe02c,0,0) 44881 authdaemond CALL getuid 44881 authdaemond RET getuid 0 44881 authdaemond CALL setsid 44881 authdaemond RET setsid 44881/0xaf51 44881 authdaemond CALL setlogin(0x801c0d400) 44881 authdaemond RET setlogin 0 44881 authdaemond CALL setgid(0x64) 44881 authdaemond RET setgid 0 44881 authdaemond CALL getuid 44881 authdaemond RET getuid 0 44881 authdaemond CALL setgroups(0x1,0x7fffffffdfdc) 44881 authdaemond RET setgroups 0 44881 authdaemond CALL setuid(0x474) 44881 authdaemond RET setuid 0 44881 authdaemond CALL execve(0x800a31364,0x7fffffffe010,0x7fffffffeab0) 44881 authdaemond NAMI "/usr/local/libexec/courier-authlib/authsystem.pas= swd" 44881 authdaemond NAMI "/usr/bin/env" 44881 authdaemond NAMI "/libexec/ld-elf.so.1" 44881 env RET execve 0 44881 env CALL=20 mmap(0,0x8000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffff= ffff,0) 44881 env RET mmap 34366156800/0x80061f000 44881 env CALL issetugid 44881 env RET issetugid 0 44881 env CALL lstat(0x800623000,0x7fffffffd2a8) 44881 env NAMI "/etc" 44881 env STRU struct stat {dev=3D2190455046, ino=3D24, mode=3D04075= 5, nlink=3D23, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1457064003, stime=3D1458062741.296935914, ctime=3D1458062741.296935914, birthtime=3D1457063917.715644334, size=3D110, blksize=3D7680, blocks=3D17, = flags=3D0x800 } 44881 env RET lstat 0 44881 env CALL lstat(0x800623000,0x7fffffffd2a8) 44881 env NAMI "/etc/libmap.conf" 44881 env STRU struct stat {dev=3D2190455046, ino=3D306131, mode=3D0= 100644, nlink=3D1, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1457088188.70505558= 6, stime=3D1457088188.705055586, ctime=3D1457088188.705055586, birthtime=3D1457088188.705055586, size=3D109, blksize=3D4096, blocks=3D9, f= lags=3D0x800 } 44881 env RET lstat 0 44881 env CALL=20 openat(AT_FDCWD,0x800623000,0x100000<O_CLOEXEC>,<unused>0) 44881 env NAMI "/etc/libmap.conf" 44881 env RET openat 6 44881 env CALL fstat(0x6,0x7fffffffdf60) 44881 env STRU struct stat {dev=3D2190455046, ino=3D306131, mode=3D0= 100644, nlink=3D1, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1457088188.70505558= 6, stime=3D1457088188.705055586, ctime=3D1457088188.705055586, birthtime=3D1457088188.705055586, size=3D109, blksize=3D4096, blocks=3D9, f= lags=3D0x800 } 44881 env RET fstat 0 44881 env CALL mmap(0,0x6d,0x1<PROT_READ>,0x2<MAP_PRIVATE>,0x6,0) 44881 env RET mmap 34366189568/0x800627000 44881 env CALL close(0x6) 44881 env RET close 0 44881 env CALL lstat(0x800623800,0x7fffffffc638) 44881 env NAMI "/usr" 44881 env STRU struct stat {dev=3D2190455046, ino=3D26, mode=3D04075= 5, nlink=3D16, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1457064003, stime=3D1457303821.464661993, ctime=3D1457303821.464661993, birthtime=3D1457063917.716645041, size=3D16, blksize=3D4096, blocks=3D17, f= lags=3D0x800 } 44881 env RET lstat 0 44881 env CALL lstat(0x800623800,0x7fffffffc638) 44881 env NAMI "/usr/local" 44881 env STRU struct stat {dev=3D2190455046, ino=3D76, mode=3D04075= 5, nlink=3D20, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1457064003, stime=3D1457977479.199812788, ctime=3D1457977479.199812788, birthtime=3D1457063917.766644318, size=3D21, blksize=3D4096, blocks=3D17, f= lags=3D0x800 } 44881 env RET lstat 0 44881 env CALL lstat(0x800623800,0x7fffffffc638) 44881 env NAMI "/usr/local/etc" 44881 env STRU struct stat {dev=3D2190455046, ino=3D240163, mode=3D0= 40755, nlink=3D23, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1457079143.5525956= 96, stime=3D1458060983.425057141, ctime=3D1458060983.425057141, birthtime=3D1457079143.552595696, size=3D68, blksize=3D4608, blocks=3D17, f= lags=3D0x800 } 44881 env RET lstat 0 44881 env CALL lstat(0x800623800,0x7fffffffc638) 44881 env NAMI "/usr/local/etc/libmap.d" 44881 env RET lstat -1 errno 2 No such file or directory 44881 env CALL munmap(0x800627000,0x6d) 44881 env RET munmap 0 44881 env CALL=20 openat(AT_FDCWD,0x800619713,0x100000<O_CLOEXEC>,<unused>0) 44881 env NAMI "/var/run/ld-elf.so.hints" 44881 env RET openat 6 44881 env CALL read(0x6,0x7fffffffd798,0x80) 44881 env GIO fd 6 read 128 bytes 0x0000 4568 6e74 0100 0000 8000 0000 d100 0000 0000 0000 d000 0000 0= 000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 = 0000 0000 0000 0000 0000 0000 0000 0000=20 |Ehnt....................................................................| 0x0048 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0= 000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000= =20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 |........................................................| 44881 env RET read 128/0x80 44881 env CALL lseek(0x6,0x80,SEEK_SET) 44881 env RET lseek 128/0x80 44881 env CALL read(0x6,0x800621300,0xd1) 44881 env GIO fd 6 read 209 bytes =20=20=20=20=20=20 "/lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/compat:/usr/lo= cal/lib/courier-authlib:/usr/local/lib/dovecot:/usr/local/lib/gcc48:/usr/lo= cal/lib/libnet11:/usr/local/lib/mysql:/usr/local/llvm36/lib\0" 44881 env RET read 209/0xd1 44881 env CALL close(0x6) 44881 env RET close 0 44881 env CALL access(0x800623800,0<F_OK>) 44881 env NAMI "/lib/libc.so.7" 44881 env RET access 0 44881 env CALL=20 openat(AT_FDCWD,0x800620060,0x100000<O_CLOEXEC>,<unused>0) 44881 env NAMI "/lib/libc.so.7" 44881 env RET openat 6 44881 env CALL fstat(0x6,0x7fffffffd870) 44881 env STRU struct stat {dev=3D2190455046, ino=3D294944, mode=3D0= 100444, nlink=3D1, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1457088085.80655858= 4, stime=3D1457088085.811062921, ctime=3D1457088085.832276767, birthtime=3D1457088085.806558584, size=3D1642888, blksize=3D131072, blocks= =3D2025, flags=3D0x20000 } 44881 env RET fstat 0 44881 env CALL=20 mmap(0,0x1000,0x1<PROT_READ>,0x40002<MAP_PRIVATE|MAP_PREFAULT_READ>,0x6,0) 44881 env RET mmap 34366189568/0x800627000 44881 env CALL=20 mmap(0,0x3ac000,0<PROT_NONE>,0x21002<MAP_PRIVATE|MAP_ANON|MAP_NOCORE>,0xfff= fffff,0) 44881 env RET mmap 34368262144/0x800821000 44881 env CALL=20 mmap(0x800821000,0x176000,0x5<PROT_READ|PROT_EXEC>,0x60012<MAP_PRIVATE|MAP_= FIXED|MAP_NOCORE|MAP_PREFAULT_READ>,0x6,0) 44881 env RET mmap 34368262144/0x800821000 44881 env CALL=20 mmap(0x800b97000,0xc000,0x3<PROT_READ|PROT_WRITE>,0x40012<MAP_PRIVATE|MAP_F= IXED|MAP_PREFAULT_READ>,0x6,0x176000) 44881 env RET mmap 34371891200/0x800b97000 44881 env CALL=20 mmap(0x800ba3000,0x2a000,0x3<PROT_READ|PROT_WRITE>,0x1012<MAP_PRIVATE|MAP_F= IXED|MAP_ANON>,0xffffffff,0) 44881 env RET mmap 34371940352/0x800ba3000 44881 env CALL munmap(0x800627000,0x1000) 44881 env RET munmap 0 44881 env CALL close(0x6) 44881 env RET close 0 44881 env CALL munmap(0x800626000,0x1000) 44881 env RET munmap 0 44881 env CALL=20 mmap(0,0x19000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xfff= fffff,0) 44881 env RET mmap 34366185472/0x800626000 44881 env CALL sysarch(0x81,0x7fffffffe018) 44881 env RET sysarch 0 44881 env CALL sigprocmask(SIG_BLOCK,0x8008205f8,0x7fffffffdfd0) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_SETMASK,0x80082060c,0) 44881 env RET sigprocmask 0 44881 env CALL readlink(0x80096d97e,0x7fffffffd740,0x400) 44881 env NAMI "/etc/malloc.conf" 44881 env RET readlink -1 errno 2 No such file or directory 44881 env CALL issetugid 44881 env RET issetugid 0 44881 env CALL=20 mmap(0,0x400000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xff= ffffff,0) 44881 env RET mmap 34372112384/0x800bcd000 44881 env CALL munmap(0x800bcd000,0x400000) 44881 env RET munmap 0 44881 env CALL=20 mmap(0,0x7ff000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xff= ffffff,0) 44881 env RET mmap 34372112384/0x800bcd000 44881 env CALL munmap(0x800bcd000,0x33000) 44881 env RET munmap 0 44881 env CALL munmap(0x801000000,0x3cc000) 44881 env RET munmap 0 44881 env CALL sigprocmask(SIG_BLOCK,0x8008205f8,0x7fffffffdb60) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_SETMASK,0x80082060c,0) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_BLOCK,0x8008205f8,0x7fffffffdb60) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_SETMASK,0x80082060c,0) 44881 env RET sigprocmask 0 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/sbin/expect -f" 44881 env RET execve -1 errno 2 No such file or directory 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/bin/expect -f" 44881 env RET execve -1 errno 2 No such file or directory 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/usr/sbin/expect -f" 44881 env RET execve -1 errno 2 No such file or directory 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/usr/bin/expect -f" 44881 env RET execve -1 errno 2 No such file or directory 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/usr/games/expect -f" 44881 env RET execve -1 errno 2 No such file or directory 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/usr/local/sbin/expect -f" 44881 env RET execve -1 errno 2 No such file or directory 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/usr/local/bin/expect -f" 44881 env RET execve -1 errno 2 No such file or directory 44881 env CALL execve(0x7fffffffe580,0x7fffffffea98,0x7fffffffeab0) 44881 env NAMI "/root/bin/expect -f" 44881 env RET execve -1 errno 13 Permission denied 44881 env CALL stat(0x7fffffffe580,0x7fffffffe500) 44881 env NAMI "/root/bin/expect -f" 44881 env RET stat -1 errno 13 Permission denied 44881 env CALL write(0x2,0x7fffffffe350,0x5) 44881 env GIO fd 2 wrote 5 bytes "env: " 44881 env RET write 5 44881 env CALL write(0x2,0x7fffffffe440,0x9) 44881 env GIO fd 2 wrote 9 bytes "expect -f" 44881 env RET write 9 44881 env CALL write(0x2,0x800971918,0x2) 44881 env GIO fd 2 wrote 2 bytes ": " 44881 env RET write 2 44881 env CALL=20 mmap(0,0x400000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xff= ffffff,0) 44881 env RET mmap 34376515584/0x801000000 44881 env CALL stat(0x7fffffffe3f0,0x7fffffffe378) 44881 env NAMI "/usr/share/nls/C/libc.cat" 44881 env RET stat -1 errno 2 No such file or directory 44881 env CALL stat(0x7fffffffe3f0,0x7fffffffe378) 44881 env NAMI "/usr/share/nls/libc/C" 44881 env RET stat -1 errno 2 No such file or directory 44881 env CALL stat(0x7fffffffe3f0,0x7fffffffe378) 44881 env NAMI "/usr/local/share/nls/C/libc.cat" 44881 env RET stat -1 errno 2 No such file or directory 44881 env CALL stat(0x7fffffffe3f0,0x7fffffffe378) 44881 env NAMI "/usr/local/share/nls/libc/C" 44881 env RET stat -1 errno 2 No such file or directory 44881 env CALL madvise(0x801006000,0x1000,MADV_FREE) 44881 env RET madvise 0 44881 env CALL madvise(0x801007000,0x1000,MADV_FREE) 44881 env RET madvise 0 44881 env CALL write(0x2,0x7fffffffe350,0x1a) 44881 env GIO fd 2 wrote 26 bytes "No such file or directory " 44881 env RET write 26/0x1a 44881 env CALL sigprocmask(SIG_BLOCK,0x8008205f8,0x7fffffffe710) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_SETMASK,0x80082060c,0) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_BLOCK,0x8008205f8,0x7fffffffe2a0) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_SETMASK,0x80082060c,0) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_BLOCK,0x8008205f8,0x7fffffffe2a0) 44881 env RET sigprocmask 0 44881 env CALL sigprocmask(SIG_SETMASK,0x80082060c,0) 44881 env RET sigprocmask 0 44881 env CALL exit(0x7f) 44868 authdaemond CSW stop kernel "wait" 44868 authdaemond CSW resume kernel "wait" 44868 authdaemond RET wait4 44881/0xaf51 44868 authdaemond CALL select(0x5,0,0x7fffffffdfb0,0,0x7fffffffdfa0) 44868 authdaemond RET select 1 44868 authdaemond CALL write(0x4,0x4047a1,0x5) 44868 authdaemond GIO fd 4 wrote 5 bytes "FAIL " --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-208036-13>