devdaily home | apple | java | perl | unix | directory | blog

What this is

This file is included in the DevDaily.com "Ruby Source Code Warehouse" project. The intent of this project is to help you "Learn Ruby by Example" TM.

Other links

The source code

# $Id: apopfilter_file.rb,v 1.2 2004/04/04 02:10:14 tommy Exp $
#
# Copyright (C) 2003-2004 TOMITA Masahiro
# tommy@tmtm.org
#
require "dbm"
class POPS
  def get_passwd(user)
    pw = nil
    File::open($apop_passwd_file, "r") do |lock|
      lock.flock(File::LOCK_SH)
      pw = DBM::open($apop_passwd_file) {|dbm| dbm[user]}
    end
    pw
  end
end




Copyright 1998-2008 Alvin Alexander
All Rights Reserved.
 
devdaily.com is based in louisville, kentucky, and this web site is hosted by godaddy.com