Discussion:
bug#29939: HELP:enter a "ls"command, then the os connection will closed
(too old to reply)
l***@chinaunicom.cn
2018-01-02 06:25:24 UTC
Permalink
Hi:
When I enter a "ls " command at the directory "/root",the OS connection will closed.

The release of OS is :
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

There is no much files at the directory,I used the "du -sh *" command to look all the files:
TJTV_APIGW_AEPPortal01:~ # du -sh *
4.0K 1211.cap
16K 123.cap
8.0K 1.cap
0 1.pcap
8.0K 202.cap
152K 211.cap
4.0K 21.cap
4.0K 21.pcap
4.0K 22.cap
4.0K 2.cap
8.0K aaa.cap
4.0K A.cap
4.0K aep1211.cap
4.0K apigw.cap
252K atop-1.27-3.929.x86_64.rpm
56K autoinst.xml
4.0K bin
240K bmuSudoScripts
7.8G breeze
8.0K build_trust_relation.exp
4.0K CpServer
4.0K Desktop
20K Documents
4.0K error.cap
4.0K Foundweakpasswds.txt
4.0K gate.cap
4.0K getOrders
12K ha.cap
8.0K hx.cap
4.0K ideploy_file_history
52K inst-sys
4.0K main
24M OralcePathPak
24M OralcePathPak.tar
4.0K p.cap
4.0K queryOrder
4.0K queryOrder.1
4.0K queryOrder.2
4.0K qyw13.cap
4.0K qyw1.cap
544K remoteExecScript
216K secbackup
4.0K sendsmsauthcode.jsp
8.3M suse11sp1
8.0M suse11sp1.zip
4.0K sysconf.temp
92K uniagent
4.0K weakpasswd.txt
4.0K yoy.cap
4.0K yy.cap





中国联合网络通信有限公司
TV增值业务运营中心
李磊
Tel: 15620012157
Email:***@chinaunicom.cn
地址:天津市南开区南马路1151号2楼
Bernhard Voelker
2018-01-03 13:11:57 UTC
Permalink
On 01/02/2018 07:25 AM, ***@chinaunicom.cn wrote:
> When I enter a "ls " command at the directory "/root",the OS connection will closed.

are you sure "ls" is /usr/bin/ls?

$ type ls
ls is /usr/bin/ls

I.e., it could be aliased to something weird, e.g. a shell function which
calls '/usr/bin/ls' under the hood but "exit"s in certain cases:

$ _ls() { /usr/bin/ls ${1+"$@"} | grep . || exit; }

$ alias ls=_ls

$ type ls
ls is aliased to `_ls'

$ ls
bin
file
home
...

$ ls ENOENT
/usr/bin/ls: cannot access 'ENOENT': No such file or directory
logout

Other than that, I don't see how the spawned 'ls' process could lead
to a logout of the calling shell process.

Have a nice day,
Berny
l***@chinaunicom.cn
2018-01-04 00:58:34 UTC
Permalink
Hi:
Thank you for your response¡£

"ls" is /bin/ls

the "/usr/bin/ls" is not exist


Is there any log I can see to find the reason?


Look forward to your reply¡£




ÖйúÁªºÏÍøÂçÍšÐÅÓÐÏÞ¹«ËŸ
TVÔöÖµÒµÎñÔËÓªÖÐÐÄ
ÀîÀÚ
Tel: 15620012157
Email£º***@chinaunicom.cn
µØÖ·£ºÌìœòÊÐÄÏ¿ªÇøÄÏÂí·1151ºÅ2Â¥

·¢ŒþÈË£º Bernhard Voelker
·¢ËÍʱŒä£º 2018-01-03 21:11
ÊÕŒþÈË£º ***@chinaunicom.cn; ***@debbugs.gnu.org
Ö÷Ì⣺ Re: bug#29939: HELP:enter a "ls"command, then the os connection will closed
On 01/02/2018 07:25 AM, ***@chinaunicom.cn wrote:
> When I enter a "ls " command at the directory "/root",the OS connection will closed.

are you sure "ls" is /usr/bin/ls?

$ type ls
ls is /usr/bin/ls

I.e., it could be aliased to something weird, e.g. a shell function which
calls '/usr/bin/ls' under the hood but "exit"s in certain cases:

$ _ls() { /usr/bin/ls ${1+"$@"} | grep . || exit; }

$ alias ls=_ls

$ type ls
ls is aliased to `_ls'

$ ls
bin
file
home
...

$ ls ENOENT
/usr/bin/ls: cannot access 'ENOENT': No such file or directory
logout

Other than that, I don't see how the spawned 'ls' process could lead
to a logout of the calling shell process.

Have a nice day,
Berny
Bernhard Voelker
2018-01-08 15:22:12 UTC
Permalink
On 01/04/2018 01:58 AM, ***@chinaunicom.cn wrote:
> $ type ls
> ls is aliased to `ls $LS_OPTIONS'

It was a bit hard to find a an old SLES-11.1 ...
Hmm, is your LS_OPTIONS set to something strange?
What if you remove the alias?

Have a nice day,
Berny
Assaf Gordon
2018-10-30 02:27:38 UTC
Permalink
tags 29939 moreinfo
close 29939
stop

(triaging old bugs)

On 2018-01-08 8:22 a.m., Bernhard Voelker wrote:
> On 01/04/2018 01:58 AM, ***@chinaunicom.cn wrote:
>> $ type ls
>> ls is aliased to `ls $LS_OPTIONS'
>
> It was a bit hard to find a an old SLES-11.1 ...
> Hmm, is your LS_OPTIONS set to something strange?
> What if you remove the alias?
>

With no further comments in 10 months,
I'm closing this bug.
If this is still an issue, please reply with more details.

-assaf
Loading...