Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to generate additional resources #75

Closed
0x9090 opened this issue May 5, 2016 · 1 comment
Closed

Failed to generate additional resources #75

0x9090 opened this issue May 5, 2016 · 1 comment

Comments

@0x9090
Copy link

0x9090 commented May 5, 2016

Running OS_hardening module throws the following error,

Error: /Stage[main]/Os_hardening::Minimize_access/File[/usr/bin]: Failed to generate additional resources using 'eval_generate': Too many levels of symbolic links @ rb_file_s_stat - /usr/bin/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/lzcat

OS_hardening is at version 1.1.2 on patched Debian Jessie. I'm instantiating the module with these parameters,

class spacex_os_hardening_rules {
  class { "os_hardening":
    system_environment        => "default",
    desktop_enabled           => false,
    enable_ipv4_forwarding    => false,
    enable_ipv6_forwarding    => false,
    enable_ipv6               => false,
    arp_restricted            => true,
    extra_user_paths          => [],
    umask                     => "027",
    password_max_age          => 182,
    password_min_age          => 7,
    auth_retries              => 5,
    auth_lockout_time         => 300,
    login_timeout             => 60,
    allow_login_without_home  => true,
    passwdqc_enabled          => false,
    # passwdqc_options          => "",
    allow_change_user         => true,
    enable_module_loading     => true,
    load_modules              => [],
    enable_sysrq              => false,
    enable_core_dump          => false,
    enable_stack_protection   => true,
    # cpu_vendor                => 'intel'
    root_ttys                 => ["console","tty1","tty2","tty3","tty4","tty5","tty6","ttyS0","ttyS1"],
    # whitelist                 => [],
    # blacklist                 => [],
    # remove_from_unknown       => false,
    # dry_run_on_unknown        => false,
  }
}
@0x9090
Copy link
Author

0x9090 commented May 20, 2016

This bug was due to a erroneous symlink, originally created by X11.

ls -alh /usr/bin | grep X11
lrwxrwxrwx  1 root   root       1 May  6  2013 X11 -> .

That X11 symlink points to it's own parent directory, and thus the OS Hardening module recurses on it. The issue was solved by having Puppet delete that file before applying the hardening module.

http://ubuntuforums.org/showthread.php?t=829402

@0x9090 0x9090 closed this as completed May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant