{"action":"created","issue":{"url":"https://api.github.com/repos/google/nsscache/issues/53","labels_url":"https://api.github.com/repos/google/nsscache/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/google/nsscache/issues/53/comments","events_url":"https://api.github.com/repos/google/nsscache/issues/53/events","html_url":"https://github.com/google/nsscache/issues/53","id":109392631,"number":53,"title":"How to handle spaces in user names?","user":{"login":"jtpereyda","id":244969,"avatar_url":"https://avatars.githubusercontent.com/u/244969?v=3","gravatar_id":"","url":"https://api.github.com/users/jtpereyda","html_url":"https://github.com/jtpereyda","followers_url":"https://api.github.com/users/jtpereyda/followers","following_url":"https://api.github.com/users/jtpereyda/following{/other_user}","gists_url":"https://api.github.com/users/jtpereyda/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpereyda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpereyda/subscriptions","organizations_url":"https://api.github.com/users/jtpereyda/orgs","repos_url":"https://api.github.com/users/jtpereyda/repos","events_url":"https://api.github.com/users/jtpereyda/events{/privacy}","received_events_url":"https://api.github.com/users/jtpereyda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-01T21:52:15Z","updated_at":"2015-10-01T22:00:41Z","closed_at":null,"body":"I don't know why my location's LDAP server is giving me user names with spaces, but it causes the update command to fail (at least the first time). Sample debug output (names tweaked for privacy):\r\n\r\n    DEBUG:NssDbShadowHandler:missing: set(['.Rose Rosey', '.Proj Trainer', '.Jim Knuth', '.Jerry Demo', '.Main Supervisors'])\r\n\r\n#### On the error\r\n - The temp file contents do include strings like `^U^@^ARose Rosey:*:::::::0^@^E^@^A01115^V^@^A`, so it's not being read back properly.\r\n - The cache keys, read back for verification, include items like `.Rose` and `.Proj`, with the second half truncated.\r\n\r\n#### Wait a minute\r\nUnix shortnames can't include spaces anyway, right?\r\n\r\n#### Proposed Solutions:\r\n 1. Ignore names with spaces on verification step.\r\n 2. Ignore names with spaces on Write step.\r\n\r\nSuggestions welcome. 2 seems like the right thing to do to me.\r\n\r\n#### More error text\r\n````\r\nDEBUG:NssDbShadowHandler:Map contains 4982 elems\r\nDEBUG:NssDbShadowHandler:executing makedb: /usr/bin/makedb - /var/lib/misc/nsscache-cache-file-qTfB8O\r\nDEBUG:NssDbShadowHandler:4982 entries written, 4982 keys\r\nDEBUG:NssDbShadowHandler:verification started /var/lib/misc/nsscache-cache-file-qTfB8O\r\nDEBUG:NssDbShadowHandler:4982 written keys, 9964 cache keys\r\nWARNING:NssDbShadowHandler:verify failed: written keys missing from the on-disk cache!\r\nDEBUG:NssDbShadowHandler:missing: set(['.Rose Rosey', '.Proj Trainer', '.Jim Knuth', '.Jerry Demo', '.Main Supervisors'])\r\nDEBUG:NssDbShadowHandler:rolling back, (not) deleting temp cache file '/var/lib/misc/nsscache-cache-file-qTfB8O'\r\nWARNING:NssDbShadowHandler:verification failed, exiting\r\n````"},"comment":{"url":"https://api.github.com/repos/google/nsscache/issues/comments/144861920","html_url":"https://github.com/google/nsscache/issues/53#issuecomment-144861920","issue_url":"https://api.github.com/repos/google/nsscache/issues/53","id":144861920,"user":{"login":"jaqx0r","id":3038203,"avatar_url":"https://avatars.githubusercontent.com/u/3038203?v=3","gravatar_id":"","url":"https://api.github.com/users/jaqx0r","html_url":"https://github.com/jaqx0r","followers_url":"https://api.github.com/users/jaqx0r/followers","following_url":"https://api.github.com/users/jaqx0r/following{/other_user}","gists_url":"https://api.github.com/users/jaqx0r/gists{/gist_id}","starred_url":"https://api.github.com/users/jaqx0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaqx0r/subscriptions","organizations_url":"https://api.github.com/users/jaqx0r/orgs","repos_url":"https://api.github.com/users/jaqx0r/repos","events_url":"https://api.github.com/users/jaqx0r/events{/privacy}","received_events_url":"https://api.github.com/users/jaqx0r/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T22:00:41Z","updated_at":"2015-10-01T22:00:41Z","body":"Does the cn or uid field hold spaces on the server? I.e. does an ldapsearch\ngive you the same results?\n\nOn Fri, 2 Oct 2015, 07:53 Joshua Pereyda <notifications@github.com> wrote:\n\n> Reopened #53 <https://github.com/google/nsscache/issues/53>.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/google/nsscache/issues/53#event-424738925>.\n>\n"}}