AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-7372

nolandda's questions

Martin Hope
nolandda
Asked: 2019-04-30 11:35:07 +0800 CST

SELinux 回归测试失败

  • 1

我从以下网址克隆了 selinux-testsuite 回归测试:https ://github.com/SELinuxProject/selinux-testsuite

我在 CentOS Linux 版本 7.6.1810 (Core) VM 中运行测试。我不认为这是相关的。

在我安装临时测试策略之前,SELinux 正在使用目标策略执行:

make -C policy load

sestatus 说

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31

我相信我已按照说明准确运行测试套件。但是,当我运行它时,我看到一个失败:

[snipped OK messages]

bounds/test ................. ok     
nnp_nosuid/test ............. ok     
mmap/test ................... 1/47 # Failed test 27 in mmap/test at line 143
#  mmap/test line 143 is:     ok($result);
mmap/test ................... Failed 1/47 subtests 
unix_socket/test ............ ok   
inet_socket/test ............ ok     

[more snipped OK messages]

Test Summary Report
-------------------
mmap/test                 (Wstat: 0 Tests: 47 Failed: 1)
  Failed test:  27
Files=51, Tests=520, 35 wallclock secs ( 0.11 usr  0.04 sys +  0.77 cusr  0.94 csys =  1.86 CPU)
Result: FAIL
Failed 1/51 test programs. 1/520 subtests failed.

我将有问题的测试从 mmap 测试组中隔离到:

#!/bin/bash

basedir=$(pwd)/tests/mmap

if [ ! -d $basedir ]; then
    printf "Error: missing basedir: $basedir\n"
    exit 1
fi

# Clean up from prior runs.
rm -f $basedir/temp_file

# Create temporary file.
dd if=/dev/zero of=$basedir/temp_file count=8 2>&1 > /dev/null
printf "\ncreate: OK\n"
chcon -t test_mmap_file_t $basedir/temp_file
printf "\nchcon: OK\n"

if [ ! -f $basedir/mmap_file_shared ]; then
    printf "Error - missing executable: $basedir/mmap_file_shared\n"
    exit 1
fi

if [ ! -f $basedir/temp_file ]; then
    printf "Error - missing temp file: $basedir/temp_file\n"
    exit 1
fi

/bin/runcon -t test_no_map_t -- $basedir/mmap_file_shared $basedir/temp_file

在 /var/log/audit/audit.log 中生成 AVC 消息:

type=AVC msg=audit(1556563573.950:2466): avc:  denied  { search } for  pid=16708 comm="mmap_file_share" name="vagrant" dev="dm-0" ino=81922 scontext=unconfined_u:unconfined_r:test_no_map_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=dir permissive=0

我不完全确定这个 AVC 是否是由测试套件打算的(作为负面测试用例)。但我想了解这种失败。

linux
  • 1 个回答
  • 285 Views
Martin Hope
nolandda
Asked: 2019-04-05 13:12:54 +0800 CST

如何提取 rpm 前导码

  • 2

我正在使用基于非 redhat 的机器,我需要从机器上传递的一些 .rpm 中提取Version: xyz和Release: abc信息。

通常一个人会这样做:

rpm -qip ./Foo.x.y.z.rpm | grep Version | awk ...

但这不是基于 redhat 的机器,所以我没有rpm,我也不想安装第二个包管理器。

我想如果我这样做:

rpm2cpio ./Foo.x.y.z.rpm | cpio -idmv

然后,当提取 cpio 时,我会找到一些名为.preamble的文件或其中包含数据的文件。但没有运气。有人知道另一种方法吗?

linux
  • 2 个回答
  • 423 Views
Martin Hope
nolandda
Asked: 2009-07-09 12:56:08 +0800 CST

Hudson 无法在 tomcat5 中启动

  • 2

Hudson 是一个持续集成引擎,在 tomcat 中作为 Java Servlet 运行。 https://hudson.dev.java.net/

我在 CentOS 5.3 系统上成功安装了 Tomcat 5.5。我可以在 8080 端口上看到它并与之交互。

我可以上传报告成功的 hudson.war 文件,并且似乎将所有内容正确解压到 webapps 目录中。

但是,当我尝试从 tomcat Web 应用程序管理器页面启动 hudson 应用程序时,它无法报告“FAIL - 上下文路径/hudson 处的应用程序无法启动”。

平衡器、管理员和其他默认 web 应用程序似乎可以正确启动。

在这个系统上启用了 SELinux,这在过去给我带来了一些麻烦。不确定是否与本案有关。

tomcat 日志如下所示:

8-Jul-09 4:32:15 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: start: Starting web application at '/hudson'
8-Jul-09 4:32:16 PM hudson.WebAppMain contextInitialized
SEVERE: Failed to initialize Hudson
java.lang.NoClassDefFoundError: hudson.model.Hudson
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   at hudson.WebAppMain.installLogger(WebAppMain.java:227)
   at hudson.WebAppMain.contextInitialized(WebAppMain.java:112)
   at org.apache.catalina.core.StandardContext.listenerStart(catalina-5.5.23.jar.so)

   ... snip ...

   at java.lang.Class.initializeClass(libgcj.so.7rh)
   ...24 more
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class hudson.WebAppMain
java.lang.NoClassDefFoundError: hudson.model.Hudson
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   at hudson.WebAppMain.installLogger(WebAppMain.java:227)
   at hudson.WebAppMain.contextInitialized(WebAppMain.java:112)
   at org.apache.catalina.core.StandardContext.listenerStart(catalina-5.5.23.jar.so)

   ... snip ... 

   at org.apache.catalina.loader.WebappClassLoader.loadClass(catalina-5.5.23.jar.so)
   at java.lang.Class.forName(libgcj.so.7rh)
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   ...24 more
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/hudson] startup failed due to previous errors
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class hudson.WebAppMain
java.lang.NoClassDefFoundError: hudson.model.Hudson
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   at hudson.WebAppMain.contextDestroyed(WebAppMain.java:280)
   at org.apache.catalina.core.StandardContext.listenerStop(catalina-5.5.23.jar.so)

   ... snip ... 

   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.23.jar.so)
   at java.lang.Thread.run(libgcj.so.7rh)
8-Jul-09 4:32:16 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
tomcat linux centos hudson
  • 2 个回答
  • 3716 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve