checkpasswordのインストール
checkpasswordのインストール
0.改訂履歴
1.はじめに
このドキュメントでは,checkpasswdをインストールする手順を説明する. このツールは,qmailのPOPサーバであるqmail-pop3dにて,UNIXのユーザ認証を行うプログラムとなる.
なお,使用しているOSは,RedHat Linux ES3.0である.
2.インストール
[root@neptune Download]# wget http://cr.yp.to/checkpwd/checkpassword-0.90.tar.gz
--17:30:08-- http://cr.yp.to/checkpwd/checkpassword-0.90.tar.gz
=> `checkpassword-0.90.tar.gz'
cr.yp.to をDNSに問いあわせています... 131.193.178.175
cr.yp.to[131.193.178.175]:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 15,631 [application/x-gzip]
100%[===========================================================>] 15,631 41.95K/s
17:30:09 (41.88 KB/s) - `checkpassword-0.90.tar.gz' saved [15,631/15,631]
[root@neptune Download]#
|
[root@neptune Download]# tar xzf checkpassword-0.90.tar.gz
[root@neptune Download]#
|
[root@neptune Download]# cd checkpassword-0.90
[root@neptune checkpassword-0.90]# ls
CHANGES conf-cc readwrite.h
FILES conf-home str.h
Makefile conf-ld str_chr.c
README env.c str_len.c
SYSDEPS env.h str_start.c
TARGETS error.c stralloc.h
TODO error.h stralloc_cat.c
VERSION error_str.c stralloc_catb.c
alloc.c exit.h stralloc_cats.c
alloc.h find-systype.sh stralloc_eady.c
alloc_re.c gen_alloc.h stralloc_opyb.c
auto-str.c gen_allocdefs.h stralloc_opys.c
auto_home.h hasshsgr.h1 stralloc_pend.c
buffer.c hasshsgr.h2 strerr.h
buffer.h hier.c strerr_die.c
buffer_2.c install.c strerr_sys.c
buffer_copy.c instcheck.c trycpp.c
buffer_get.c open.h trycrypt.c
buffer_put.c open_read.c tryshadow.c
byte.h open_trunc.c tryshsgr.c
byte_copy.c pathexec.h tryslib.c
byte_cr.c pathexec_env.c tryspnam.c
byte_diff.c pathexec_run.c tryuserpw.c
checkpassword.c print-cc.sh warn-auto.sh
chkshsgr.c prot.c warn-shsgr
choose.sh prot.h x86cpuid.c
[root@neptune checkpassword-0.90]#
|
[root@neptune checkpassword-0.90]# make
./compile checkpassword.c
./compile chkshsgr.c
./load chkshsgr
./chkshsgr || ( cat warn-shsgr; exit 1 )
./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
./compile prot.c
./compile alloc.c
./compile alloc_re.c
./compile buffer.c
./compile buffer_2.c
./compile buffer_copy.c
./compile buffer_get.c
./compile buffer_put.c
./compile env.c
./compile error.c
./compile error_str.c
./compile open_read.c
./compile open_trunc.c
./compile pathexec_env.c
./compile pathexec_run.c
./compile stralloc_cat.c
./compile stralloc_catb.c
./compile stralloc_cats.c
./compile stralloc_eady.c
./compile stralloc_opyb.c
./compile stralloc_opys.c
./compile stralloc_pend.c
./compile strerr_die.c
./compile strerr_sys.c
./makelib unix.a alloc.o alloc_re.o buffer.o buffer_2.o ¥
buffer_copy.o buffer_get.o buffer_put.o env.o error.o ¥
error_str.o open_read.o open_trunc.o pathexec_env.o ¥
pathexec_run.o prot.o stralloc_cat.o stralloc_catb.o ¥
stralloc_cats.o stralloc_eady.o stralloc_opyb.o ¥
stralloc_opys.o stralloc_pend.o strerr_die.o strerr_sys.o
./compile byte_copy.c
./compile byte_cr.c
./compile byte_diff.c
./compile str_chr.c
./compile str_len.c
./compile str_start.c
./makelib byte.a byte_copy.o byte_cr.o byte_diff.o ¥
str_chr.o str_len.o str_start.o
./load checkpassword prot.o unix.a byte.a `cat ¥
shadow.lib` `cat crypt.lib` `cat s.lib`
checkpassword.o(.text+0xfa): In function `main':
: undefined reference to `errno'
checkpassword.o(.text+0x243): In function `main':
: undefined reference to `errno'
checkpassword.o(.text+0x265): In function `main':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0xf6): In function `pathexec_run':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0x13a): In function `pathexec_run':
: undefined reference to `errno'
unix.a(alloc.o)(.text+0x48): more undefined references to `errno' follow
collect2: ld はステータス 1 で終了しました
make: *** [checkpassword] エラー 1
[root@neptune checkpassword-0.90]#
|
- やっぱりエラーが出た.
- error.hヘッダファイルを次のように修正する.
修正前 |
#ifndef ERROR_H
#define ERROR_H
extern int errno;
extern int error_intr;
extern int error_nomem;
extern int error_noent;
extern int error_txtbsy;
extern int error_io;
extern int error_exist;
|
修正後 |
#ifndef ERROR_H
#define ERROR_H
#include <errno.h>
extern int error_intr;
extern int error_nomem;
extern int error_noent;
extern int error_txtbsy;
extern int error_io;
extern int error_exist;
|
[root@neptune checkpassword-0.90]# make
./compile checkpassword.c
./compile alloc.c
./compile buffer_get.c
./compile buffer_put.c
./compile error.c
./compile error_str.c
./compile pathexec_run.c
./compile strerr_sys.c
./makelib unix.a alloc.o alloc_re.o buffer.o buffer_2.o ¥
buffer_copy.o buffer_get.o buffer_put.o env.o error.o ¥
error_str.o open_read.o open_trunc.o pathexec_env.o ¥
pathexec_run.o prot.o stralloc_cat.o stralloc_catb.o ¥
stralloc_cats.o stralloc_eady.o stralloc_opyb.o ¥
stralloc_opys.o stralloc_pend.o strerr_die.o strerr_sys.o
./load checkpassword prot.o unix.a byte.a `cat ¥
shadow.lib` `cat crypt.lib` `cat s.lib`
./compile install.c
./compile hier.c
./compile auto-str.c
./load auto-str unix.a byte.a
./auto-str auto_home `head -1 conf-home` > auto_home.c
./compile auto_home.c
./load install hier.o auto_home.o unix.a byte.a
./compile instcheck.c
./load instcheck hier.o auto_home.o unix.a byte.a
[root@neptune checkpassword-0.90]#
|
- 今回は問題なくコンパイルできた模様.
- インストールを行う.
[root@neptune checkpassword-0.90]# make setup check
./install
./instcheck
[root@neptune checkpassword-0.90]#
|
[root@neptune checkpassword-0.90]# ls -la /bin/checkpassword
-rwx------ 1 root root 7804 2月 9 17:36 /bin/checkpassword
[root@neptune checkpassword-0.90]#
|