Comments (4)
Comment #1 originally posted by jaqx0r on 2013-09-16T12:35:41.000Z:
Should be safe before any data is written, and it probably should be created with the same permissions and ownership as /etc/shadow and /etc/shadow.cache.
Err, from memory: nsscache no longer makes .db files by default ???
from nsscache.
Comment #2 originally posted by jaqx0r on 2013-09-19T13:53:10.000Z:
I've had a bit of a look.
nsscache should be setting the .db to the same permissions as the original file, using shutil.copymode(). If that fails, it sets it to 644.
makedb, the process that makes shadow.db does not write to stdout, so it doesn't follow normal mkstemp() processes. It does, however, honour umask.
The attached patch should give you a file that's 0000 or 0400 after running. Can you try it?
If it does NOT work, can you possibly try shutil.copymode() in a python process? Does it exist in your version of python?
from nsscache.
Comment #3 originally posted by jaqx0r on 2013-09-21T20:10:02.000Z:
I found what seems to be the root cause of the problem: the call to GetCompatFilename returns "/var/lib/misc/shadow" (my nsscache.conf has "nssdb_dir = /var/lib/misc" in it), so copymode fails.
What did work for me is:
--- caches.py.orig 2013-09-21 22:05:39.073824061 +0200
+++ caches.py 2013-09-21 22:06:32.417825015 +0200
@@ -169,7 +169,7 @@
def GetCompatFilename(self):
"""Return the filename where the normal (not-cache) map would be."""
- return os.path.join(self.output_dir, self.map_name)
- return os.path.join('/etc', self.map_name)
def GetMapLocation(self):
"""Return the location of the Map in this cache.
from nsscache.
Comment #4 originally posted by jaqx0r on 2013-10-01T10:21:08.000Z:
This issue was closed by revision b1e9f6ed3a06.
from nsscache.
Related Issues (20)
- nsscache doesn't map all members of a group HOT 2
- reformat by removing error E713 for membership test HOT 7
- ShadowExpire == -1 HOT 1
- sshkey map fails to import HOT 4
- Not all LDAP servers provide LastModification Dates
- bsddb3 is deprecated HOT 3
- `uidattr` ignored when writing out groups
- mox3 archived & deprecated upstream, please update tests to not use it HOT 3
- Does not work offline. HOT 6
- Question: Merge groups with the same ids
- Add support for GCS source HOT 1
- skip the unexcepted line in the cache file
- Please support nested groups HOT 11
- Tagging of versions HOT 3
- nsscache doesn't update group cache from ldap source HOT 7
- ConfigParser.NoSectionError: No section: 'suffix' with nsscache >= 0.36 HOT 2
- configure nsscache with samba4 active directory HOT 31
- is nsscache python3 compatible? HOT 25
- Get integration tests running in CI HOT 37
- Properly define byte vs string types in source and cache api boundaries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsscache.