summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Tools/POSIX
Commit message (Collapse)AuthorAgeFilesLines
* POSIX: Don't follow symlinks when changing ownerHolger Weiß2018-05-181-3/+3
| | | | | Don't let the client follow symbolic links when changing the owner of a path.
* Client: Restore python2.4 compatibilityAlexander Sulfrian2017-03-291-0/+1
|
* Fix errros with old pylint/pep8Alexander Sulfrian2017-03-291-4/+4
| | | | | | | | | | | | For Python2.4 we need older version of pylint and pep8, that finds some more errors: - On python2.4 _ast is not available and pylint uses compiler.ast, that seems to have some problems with the line numbers if a comment is following the pylint disable marker. - In python2.4 there is no xml.etree. But we can ignore this error because Client.XML tries to find a suitable library. - Some small formatting issues.
* Client: Fix typo in commentAlexander Sulfrian2016-11-211-2/+2
|
* Client/Tools/POSIX: Avoid lxml features in AugeasDmitri Iouchtchenko2016-11-041-14/+15
|
* Merge branch 'client-secontext' of https://github.com/gordonmessmer/bcfg2Sol Jerome2016-01-201-2/+2
|\
| * Only set wanted_secontext if we have a value to setGordon Messmer2015-11-191-1/+1
| |
| * bcfg2 server sends a complete SELinux context, but we only need the type. ↵Gordon Messmer2015-11-181-1/+1
| | | | | | | | Treat this the same as selinux.matchpathcon.
* | Fix SELinux option parsing.Gordon Messmer2015-11-192-2/+2
|/
* Utils: Generalize is_string from POSIX/FileAlexander Sulfrian2015-07-221-17/+3
| | | | | | is_string from POSIX/File could be used in other situations, too. So we move it to Utils, use it from Lint/MergeFiles and replace a custom is_binary function.
* Merge branch 'maint'Alexander Sulfrian2015-06-121-19/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: debian/changelog doc/conf.py misc/bcfg2-selinux.spec misc/bcfg2.spec osx/Makefile osx/macports/Portfile solaris-ips/MANIFEST.bcfg2-server.header solaris-ips/MANIFEST.bcfg2.header solaris-ips/Makefile solaris-ips/pkginfo.bcfg2 solaris-ips/pkginfo.bcfg2-server solaris/Makefile solaris/pkginfo.bcfg2 solaris/pkginfo.bcfg2-server src/lib/Bcfg2/Client/Tools/APT.py src/lib/Bcfg2/Client/Tools/FreeBSDInit.py src/lib/Bcfg2/Client/Tools/__init__.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Reporting/templates/base.html src/lib/Bcfg2/Server/CherrypyCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/__init__.py src/lib/Bcfg2/Server/Lint/Validate.py src/lib/Bcfg2/Server/Lint/__init__.py src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/__init__.py src/lib/Bcfg2/Server/Plugins/GroupPatterns.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/Packages/Source.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/SSHbase.py src/lib/Bcfg2/Server/Plugins/SSLCA.py src/lib/Bcfg2/version.py src/sbin/bcfg2-info src/sbin/bcfg2-test testsuite/requirements.txt
| * handle filesystem secontexts properly for contextless filesystemsRoss Smith2015-04-161-19/+23
| | | | | | | | | | | | | | | | - adds 'secontext_ignore' under POSIX in the configuration file - short circuits on filesystems that are known not to support file labels - defaults to filesystems that have a genfs command in selinux reference policy - checks for Operation not supported while setting a file label - fixes #275
* | Fixed py2.6-ism properlyChris St. Pierre2014-10-201-2/+6
| |
* | removed python 2.6-ismChris St. Pierre2014-10-201-2/+2
| |
* | Clean up unicode diff handling a little more.Matt Kemp2014-08-201-1/+1
| |
* | Fixed lint test error.Matt Kemp2014-08-151-1/+1
| |
* | udiff doesn't mean unified diff, it means unicode diffMatt Kemp2014-08-151-4/+4
| |
* | Removed ndiff from POSIXFile, only attempt unified diff.Matt Kemp2014-08-151-35/+15
| | | | | | | | | | | | | | | | | | | | This removes the ndiff, which is a bit extraneous and can cause up to 30 second timeouts on larger files with many changes. unified_diff is faster and generally more applicable, and is already what is shown to the admin on interactive mode. This can save up to 30 seconds per file, per run. A future commit can take the resulting unified diff and recreate the ndiff specifically for the reporting if that is desired.
* | Merge branch 'maint'Chris St. Pierre2014-04-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: misc/bcfg2.spec src/lib/Bcfg2/Client/Client.py src/lib/Bcfg2/Client/Tools/APK.py src/lib/Bcfg2/Client/Tools/MacPorts.py src/lib/Bcfg2/Client/Tools/Pacman.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Server/Admin/Minestruct.py src/lib/Bcfg2/Server/Admin/Pull.py src/lib/Bcfg2/Server/Admin/Viz.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-info src/sbin/bcfg2-lint src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProperties.py
* | Merge branch 'maint' into masterSol Jerome2014-04-162-54/+94
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: doc/appendix/guides/import-existing-ssh-keys.txt misc/bcfg2.spec src/lib/Bcfg2/Client/Tools/VCS.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Reporting/Storage/DjangoORM.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/__init__.py src/lib/Bcfg2/Server/Lint/RequiredAttrs.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-reports src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestAugeas.py
| * POSIX: fixed test to only apply ACLs to non-symlinksv1.3.4Chris St. Pierre2014-02-251-1/+1
| |
| * Revert "POSIX: fixed test to only apply ACLs to non-symlinks"Chris St. Pierre2014-02-251-2/+2
| | | | | | | | | | | | Massive typo. This reverts commit c51850b13f54d6f46e6c671e5ee1d3f0cacef727.
| * POSIX: fixed test to only apply ACLs to non-symlinksChris St. Pierre2014-02-251-2/+2
| |
| * POSIX: Fix verification of symlinksChris St. Pierre2014-02-211-3/+3
| | | | | | | | | | | | | | | | | | | | * Stat the link itself, not its target * Get SELinux context from the link, not the target * Don't get ACLs at all; symlinks don't have their own ACLs The first issue listed wasn't actually a bug, because none of the information queried from the target by the stat call was actually used in verification, but it's been fixed for completeness.
| * Don't strip other entries from default ACL, these are defined by mode number.Richard Connon2014-02-101-3/+1
| |
| * docstring for new sub-methodRichard Connon2014-02-041-0/+2
| |
| * Except _verify_acls from pylint branches checkRichard Connon2014-02-041-1/+1
| |
| * Removed redundant condition for empty default ACLRichard Connon2014-02-041-8/+7
| |
| * Fixed continue not in a loop error in previousRichard Connon2014-02-041-1/+1
| |
| * fix for "Too many branches" in _verify_aclsRichard Connon2014-02-041-20/+23
| |
| * Minor changes to default ACL codeRichard Connon2014-02-041-5/+4
| |
| * Support ACLs without a specific user/group for default owner/owning-group ↵Richard Connon2014-02-041-28/+52
| | | | | | | | ACLs on directories
| * Augeas: ensure that entry.attrib is always a dictChris St. Pierre2014-01-291-1/+2
| |
| * POSIX: Properly stringify ACLs with no user/group specifiedChris St. Pierre2014-01-161-1/+4
| | | | | | | | | | | | | | This is just a workaround to avoid a traceback; the real fix will involve making the POSIX tool properly handle ACLs with no user/group given, which refer to the current user/group of the file they apply to.
| * Augeas improvements:Chris St. Pierre2013-12-111-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | * Added ability to specify initial content for a file that doesn't exist, to avoid a messy situation where you'd have to probe for file existence and either use a Path type="file" or Path type="augeas" depending, and run Bcfg2 twice. * All commands in an Augeas path are run if *any* of them fail to verify. Previously, only commands that hadn't been run would be installed, but that had issues, particularly with the Clear command, which could pass verification but then be required during the installation phase anyway. * Miscellaneous bug fixes.
* | Merge branch 'maint'Chris St. Pierre2013-12-092-2/+289
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/appendix/guides/fedora.txt misc/bcfg2.spec schemas/types.xsd src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Client.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Lint/Validate.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Bundler.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Probes.py src/sbin/bcfg2-crypt testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py testsuite/common.py testsuite/install.sh
| * Augeas: avoid deprecation warningChris St. Pierre2013-12-051-2/+2
| |
| * Augeas: Added docstrings, fixed some minor pylint issuesChris St. Pierre2013-12-051-20/+91
| |
| * Augeas: Only install unverified commandsChris St. Pierre2013-12-051-0/+2
| |
| * POSIX: skip loading POSIX sub-tools that raise ImportErrorChris St. Pierre2013-12-051-2/+5
| | | | | | | | This mimics the behavior for "real" tools
| * Tools: new Augeas driverChris St. Pierre2013-12-051-0/+211
| |
* | Merge branch 'maint'Chris St. Pierre2013-09-161-0/+5
|\| | | | | | | | | | | Conflicts: src/lib/Bcfg2/Server/Plugins/Cfg/CfgPublicKeyCreator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py
| * Remove all ACLs (including mask) from entries with no ACLs listedChris St. Pierre2013-09-121-0/+5
| | | | | | | | | | | | When installing an entry with no ACLs specified, but with ACLs on the file as it exists on the filesystem, the ACL mask was preserved, even as the ACLs are deleted.
* | Pylint/PEP8 fixesSol Jerome2013-09-064-8/+9
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | POSIX: Fix merge failureSol Jerome2013-09-011-3/+3
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'maint'Sol Jerome2013-09-012-4/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: src/lib/Bcfg2/Client/Tools/__init__.py src/lib/Bcfg2/Server/BuiltinCore.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/NagiosGen.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/SSLServer.py tools/README
| * SELinux: Update the matchpathcon function to use the file's modeJonathan Billings2013-08-221-1/+2
| | | | | | | | | | | | | | | | If you don't supply a mode to the selinux.matchpathcon() function, it fails to properly look up the context in some circumstances related to context patterns in the SELinux policy. This change looks up the mode and supplies it to the function. (cherry picked from commit 20a2c9a8fb6c6ecbed259b5deccb01c01bf3304f)
| * POSIX: Fix pylint failureSol Jerome2013-08-101-1/+2
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * POSIX: Fix unicode file verificationSol Jerome2013-08-101-3/+13
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'options-rewrite'Chris St. Pierre2013-08-083-35/+52
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/lib/Bcfg2/Client/Frame.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Init.py src/lib/Bcfg2/Server/Admin/Xcmd.py src/lib/Bcfg2/Server/BuiltinCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/base.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/Server/SSLServer.py src/lib/Bcfg2/Utils.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-info src/sbin/bcfg2-lint src/sbin/bcfg2-test src/sbin/bcfg2-yum-helper tools/bcfg2-profile-templates.py