/*++ /* NAME /* mail_open_ok 3 /* SUMMARY /* scrutinize mail queue file /* SYNOPSIS /* #include <mail_open_ok.h> /* /* int mail_open_ok(queue_name, queue_id, statp, pathp) /* const char *queue_name; /* const char *queue_id; /* struct stat *statp; /* char **pathp /* DESCRIPTION /* mail_open_ok() determines if it is OK to open the specified /* queue file. /* /* The queue name and queue id should conform to the syntax /* requirements for these names. /* Unfortunately, on some systems readdir() etc. can return bogus /* file names. For this reason, the code silently ignores invalid /* queue file names. /* /* The file should have mode 0700. Files with other permissions /* are silently ignored. /* /* The file should be a regular file. /* Files that do not satisfy this requirement are skipped with /* a warning. /* /* The file link count is not restricted. With a writable maildrop /* directory, refusal to deliver linked files is prone to denial of /* service attack; it's better to deliver mail too often than not. /* /* Upon return, the \fIstatp\fR argument receives the file /* attributes and \fIpathp\fR a copy of the file name. The file /* name is volatile. Make a copy if it is to be used for any /* appreciable amount of time. /* DIAGNOSTICS /* Warnings: bad file attributes (file type), multiple hard links. /* mail_open_ok() returns MAIL_OPEN_YES for good files, MAIL_OPEN_NO /* for anything else. It is left up to the system administrator to /* deal with non-file objects. /* BUGS /* mail_open_ok() examines a queue file without actually opening /* it, and therefore is susceptible to race conditions. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.