AboutSummaryRefsLogTreeCommitDiffStats
path: root/crontab.scm
diff options
context:
space:
mode:
authordale_mellor <dale_mellor>2004-01-22 13:54:21 +0000
committerdale_mellor <dale_mellor>2004-01-22 13:54:21 +0000
commit627e81918e50e7806aace870d1529adf5d75a15d (patch)
tree379d46f025c297f9ab392d1663d85fd84227ef92 /crontab.scm
parenteb50865add48ceccfa38bf4165351dd0418df41f (diff)
downloadmcron-1.0.0.tar.gz
mcron-1.0.0.tar.bz2
mcron-1.0.0.zip
This is the version 1.0.0 release (many changes have occurred without commiting due to disruption to Savannah, including a skip over the 0.99.4 release).1.0.0
Diffstat (limited to 'crontab.scm')
-rw-r--r--crontab.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/crontab.scm b/crontab.scm
index 266311a..d347445 100644
--- a/crontab.scm
+++ b/crontab.scm
@@ -29,8 +29,8 @@
(define (hit-server user-name)
(catch #t (lambda ()
- (let* ((socket (socket AF_UNIX SOCK_STREAM 0)))
- (connect socket AF_UNIX "/var/cron/socket")
+ (let ((socket (socket AF_UNIX SOCK_STREAM 0)))
+ (connect socket AF_UNIX config-socket-file)
(display user-name socket)
(close socket)))
(lambda (key . args)
@@ -65,8 +65,8 @@
;; If the real user is not allowed to use crontab due to the /var/cron/allow
;; and/or /var/cron/deny files, bomb out now.
-(if (or (eq? (in-access-file? "/var/cron/allow" crontab-real-user) #f)
- (eq? (in-access-file? "/var/cron/deny" crontab-real-user) #t))
+(if (or (eq? (in-access-file? config-allow-file crontab-real-user) #f)
+ (eq? (in-access-file? config-deny-file crontab-real-user) #t))
(begin
(display "Access denied by system operator.\n")
(primitive-exit 6)))
@@ -103,7 +103,7 @@
;; So now we know which crontab file we will be manipulating.
-(define crontab-file (string-append "/var/cron/tabs/" crontab-user))
+(define crontab-file (string-append config-spool-dir "/" crontab-user))
@@ -139,7 +139,9 @@
;; crontab, wake the cron daemon up, and remove the temporary file.
((option-ref options 'edit #f)
- (let ((temp-file (string-append "/tmp/crontab." (number->string (getpid)))))
+ (let ((temp-file (string-append config-tmp-dir
+ "/crontab."
+ (number->string (getpid)))))
(catch #t (lambda () (copy-file crontab-file temp-file))
(lambda (key . args) (with-output-to-file temp-file noop)))
(chown temp-file (getuid) (getgid))