* passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from Pierre
Humblet). * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already have lock since that means we are in the process of reading the file.
This commit is contained in:
		@@ -71,9 +71,9 @@ public:
 | 
			
		||||
  {
 | 
			
		||||
    if (!check && initialized)
 | 
			
		||||
      return;
 | 
			
		||||
    pglock->acquire ();
 | 
			
		||||
    if (!initialized || (check && etc::file_changed (etc_ix)))
 | 
			
		||||
      (this->*read) ();
 | 
			
		||||
    if (pglock->acquire () == 1 &&
 | 
			
		||||
        (!initialized || (check && etc::file_changed (etc_ix))))
 | 
			
		||||
	(this->*read) ();
 | 
			
		||||
    pglock->release ();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user