This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testers needed: New passwd/group handling in Cygwin


Hello,

I have a a question about how this change is going to affect
third-party utilities. Especially in the case once chooses to
use the PAM method and get rid of any /etc/{passwd,group}
files completely.

There seem to be programs (mostly scripts) that make use of
/etc/passwd as a file directly.

One of them is for example "ssh-host-config".

The shell script:

- works with the file directly:
  ...
  run_service_as=$(/usr/bin/grep -Fi "${accnt_name}" /etc/passwd | /usr/bin/awk -F: '{print $1;}') 
  ...

  I assume this would have to be changed in the sshd package?

- After the script is run it sets various entries in the
  /etc/passwd file (sshd shell to /bin/false and home to /var/empty).
  I assume I would have to migrate these changes into the <cygwin />
  comment if I were to remove the passwd file now.
  But more importantly, if I were to run sshd-host-config with
  no passwd file present at all, would it correctly set up the
  <cygwin /> comment entry in the PAM?

Grepping through /bin I found at least one other package
that makes use of /etc/passwd as a file directly (cvsbug), but 
since I don't have everything installed I can only assume there
are more cygwin-packages and other programs someone might build
from source.


An idea that might sound a bit far-fetched: In case the above
is actually a problem, would it be possible to populate a virtual
/etc/passwd file on-the-fly the same way /dev/ and /proc/ are?
This way programs that rely on reading the passwd file direclty
would just keep working (writing would be more complicated
of course).


--
m0vie

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]