我有 RM/COBOL 運行時 - 版本 7.10.00 在 CentOS 6.5 機器 (VM) 上運行
此 CentOS 允許透過使用本機網域控制器對某些網域使用者的群組進行驗證來進行 SSH 存取。這些使用者會獲得一個在 /home/domainname/username 中自動建立的主目錄,而普通本機使用者則駐留在 /home/username 中
相關的 Cobol 檔案似乎位於
/usr/bin/runcobol
<- 一個檔案
/usr/bin/rmcobolso
<- 一個目錄,根據ls -a
無論如何,這是我的基本問題。當普通用戶運行命令時
# runcobol
....這只是一個基本檢查,看看命令是否有效...
他/她收到回應:
RM/COBOL Runtime - Version 7.10.00 for Linux (Intel).
Configured for 50 users.
Copyright (c) 1985, 1986-2000 by Liant Software Corp. All rights reserved.
Registration Number: 7H-1054-00367-0050
Usage: RUNCOBOL name [options]
Options: [A=arguments] [B=buffersize] [C=configfile] [D] [I] [K]
[L=libname] [M] [S=switches] [T=sortsize] [V] [X=configmod]
當我的網域用戶之一運行命令時
# runcobol
他/她收到回覆:
Segmentation fault
什麼可能導致這個問題?
編輯1:
strace runcobol
來自網域用戶。最後幾行包括:
open("/usr/lib/libnss_winbind.so.2", O_RDONLY) = -1 ENOENT (No such file or direc
stat64("/usr/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
munmap(0xf76fa000, 48317) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
這些只是最後幾行。前面的 20 行似乎都在尋找這個libnss_winbind.so.2
文件,該文件確實存在於我的伺服器上/usr/lib64/libnss_winbind.so.2
(是的,我正在運行 CentOS 6.5 64 位元)。從第一行開始strace runcobol
[test.user.co@co1tu-sv-conta bin]$ strace runcobol
execve("/usr/bin/runcobol", ["runcobol"], [/* 26 vars */]) = 0
[ Process PID=14369 runs in 32 bit mode. ]
因此,我猜(但不確定)我安裝了 64 位元版本libnss_winbind.so.2
,但runcobol
正在尋找 32 位元版本。那為什麼我的普通用戶沒有問題呢runcobol
?嗯,對於一般用戶來說strace
,似乎根本就沒有去尋找libnss_winbind.so.2
。我想這是有道理的,因為winbind
與 samba 和網域身份驗證有關,而本地用戶沒有這樣做。
此時我又陷入了困境,因為我沒有太多在 Linux 中調試的經驗。根據我有限的猜測,我看到了三個選項:
在要尋找的
libnss_winbind.so.2
位置之一尋找並安裝 32 位元版本。runcobol
我不知道在我的 64 位元 CentOS 6.5 上安裝哪個軟體包runcobol
不用尋找就可以跑libnss_winbind.so.2
。我不知道為什麼它要這樣運行,因為用戶已經通過身份驗證並且在 CentOS 系統中。身份驗證後我沒有使用任何網域資源,因此這似乎不是必要的步驟。libnss_winbind.so.2
是一個轉移注意力的事情,與分段錯誤無關。
編輯2
gdb runcobol
當時的結果run
:
來自本地用戶
Reading symbols from /usr/bin/runcobol...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/runcobol
RM/COBOL Runtime - Version 7.10.00 for Linux (Intel).
Configured for 50 users.
Copyright (c) 1985, 1986-2000 by Liant Software Corp. All rights reserved.
Registration Number: 7H-1054-00367-0050
Usage: RUNCOBOL name [options]
Options: [A=arguments] [B=buffersize] [C=configfile] [D] [I] [K]
[L=libname] [M] [S=switches] [T=sortsize] [V] [X=configmod]
Program exited with code 0373.
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6_5.4.i686
來自網域用戶
Reading symbols from /usr/bin/runcobol...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/runcobol
Program received signal SIGSEGV, Segmentation fault.
0x0805cc37 in OSINITIALIZE ()
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6_5.4.i686