Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
includes /
Delete
Unzip
Name
Size
Permission
Date
Action
actions.inc
14.34
KB
-rw-r--r--
2014-12-11 05:44
batch.inc
11.21
KB
-rw-r--r--
2014-12-11 05:44
bootstrap.inc
45.69
KB
-rw-r--r--
2014-12-11 05:44
cache-install.inc
700
B
-rw-r--r--
2014-12-11 05:44
cache.inc
7.04
KB
-rw-r--r--
2014-12-11 05:44
common.inc
130.73
KB
-rw-r--r--
2014-12-11 05:44
database.inc
21.35
KB
-rw-r--r--
2014-12-11 05:44
database.mysql-common.inc
15.17
KB
-rw-r--r--
2014-12-11 05:44
database.mysql.inc
10.81
KB
-rw-r--r--
2014-12-11 05:44
database.mysqli.inc
10.97
KB
-rw-r--r--
2014-12-11 05:44
database.pgsql.inc
26.56
KB
-rw-r--r--
2014-12-11 05:44
file.inc
56.49
KB
-rw-r--r--
2019-10-08 10:17
form.inc
94.98
KB
-rw-r--r--
2019-10-08 10:26
image.gd.inc
6.13
KB
-rw-r--r--
2014-12-11 05:44
image.inc
8.35
KB
-rw-r--r--
2014-12-11 05:44
install.inc
22
KB
-rw-r--r--
2014-12-11 05:44
install.mysql.inc
4.91
KB
-rw-r--r--
2014-12-11 05:44
install.mysqli.inc
5.03
KB
-rw-r--r--
2014-12-11 05:44
install.pgsql.inc
5.51
KB
-rw-r--r--
2014-12-11 05:44
language.inc
4.35
KB
-rw-r--r--
2014-12-11 05:44
locale.inc
95.76
KB
-rw-r--r--
2014-12-11 05:44
lock-install.inc
1.23
KB
-rw-r--r--
2014-12-11 05:44
lock.inc
7.72
KB
-rw-r--r--
2014-12-11 05:44
mail.inc
17.56
KB
-rw-r--r--
2014-12-11 05:44
menu.inc
87.69
KB
-rw-r--r--
2014-12-11 05:44
module.inc
16.83
KB
-rw-r--r--
2014-12-11 05:44
pager.inc
14.45
KB
-rw-r--r--
2014-12-11 05:44
path.inc
7.9
KB
-rw-r--r--
2014-12-11 05:44
session.inc
7.45
KB
-rw-r--r--
2014-12-11 05:44
tablesort.inc
6
KB
-rw-r--r--
2014-12-11 05:44
theme.inc
69.52
KB
-rw-r--r--
2014-12-11 05:44
theme.maintenance.inc
11.16
KB
-rw-r--r--
2014-12-11 05:44
unicode.entities.inc
5.36
KB
-rw-r--r--
2014-12-11 05:44
unicode.inc
17.23
KB
-rw-r--r--
2019-10-08 10:17
xmlrpc.inc
15.37
KB
-rw-r--r--
2014-12-11 05:44
xmlrpcs.inc
9.22
KB
-rw-r--r--
2014-12-11 05:44
Save
Rename
<?php /** * @file * A database-mediated implementation of a locking mechanism. */ /** * @defgroup lock Functions to coordinate long-running operations across requests. * @{ * In most environments, multiple Drupal page requests (a.k.a. threads or * processes) will execute in parallel. This leads to potential conflicts or * race conditions when two requests execute the same code at the same time. A * common example of this is a rebuild like menu_rebuild() where we invoke many * hook implementations to get and process data from all active modules, and * then delete the current data in the database to insert the new afterwards. * * This is a cooperative, advisory lock system. Any long-running operation * that could potentially be attempted in parallel by multiple requests should * try to acquire a lock before proceeding. By obtaining a lock, one request * notifies any other requests that a specific opertation is in progress which * must not be executed in parallel. * * To use this API, pick a unique name for the lock. A sensible choice is the * name of the function performing the operation. A very simple example use of * this API: * @code * function mymodule_long_operation() { * if (lock_acquire('mymodule_long_operation')) { * // Do the long operation here. * // ... * lock_release('mymodule_long_operation'); * } * } * @endcode * * If a function acquires a lock it should always release it when the * operation is complete by calling lock_release(), as in the example. * * A function that has acquired a lock may attempt to renew a lock (extend the * duration of the lock) by calling lock_acquire() again during the operation. * Failure to renew a lock is indicative that another request has acquired * the lock, and that the current operation may need to be aborted. * * If a function fails to acquire a lock it may either immediately return, or * it may call lock_wait() if the rest of the current page request requires * that the operation in question be complete. After lock_wait() returns, * the function may again attempt to acquire the lock, or may simply allow the * page request to proceed on the assumption that a parallel request completed * the operation. * * lock_acquire() and lock_wait() will automatically break (delete) a lock * whose duration has exceeded the timeout specified when it was acquired. * * Alternative implementations of this API (such as APC) may be substituted * by setting the 'lock_inc' variable to an alternate include filepath. Since * this is an API intended to support alternative implementations, code using * this API should never rely upon specific implementation details (for example * no code should look for or directly modify a lock in the {semaphore} table). */ /** * Initialize the locking system. */ function lock_init() { global $locks; $locks = array(); } /** * Helper function to get this request's unique id. */ function _lock_id() { static $lock_id; if (!isset($lock_id)) { // Assign a unique id. $lock_id = uniqid(mt_rand(), TRUE); // We only register a shutdown function if a lock is used. register_shutdown_function('lock_release_all', $lock_id); } return $lock_id; } /** * Acquire (or renew) a lock, but do not block if it fails. * * @param $name * The name of the lock. * @param $timeout * A number of seconds (float) before the lock expires. * @return * TRUE if the lock was acquired, FALSE if it failed. */ function lock_acquire($name, $timeout = 30.0) { global $locks; // Insure that the timeout is at least 1 ms. $timeout = max($timeout, 0.001); list($usec, $sec) = explode(' ', microtime()); $expire = (float)$usec + (float)$sec + $timeout; if (isset($locks[$name])) { // Try to extend the expiration of a lock we already acquired. db_query("UPDATE {semaphore} SET expire = %f WHERE name = '%s' AND value = '%s'", $expire, $name, _lock_id()); if (!db_affected_rows()) { // The lock was broken. unset($locks[$name]); } } else { // Optimistically try to acquire the lock, then retry once if it fails. // The first time through the loop cannot be a retry. $retry = FALSE; // We always want to do this code at least once. do { if (@db_query("INSERT INTO {semaphore} (name, value, expire) VALUES ('%s', '%s', %f)", $name, _lock_id(), $expire)) { // We track all acquired locks in the global variable. $locks[$name] = TRUE; // We never need to try again. $retry = FALSE; } else { // Suppress the error. If this is our first pass through the loop, // then $retry is FALSE. In this case, the insert must have failed // meaning some other request acquired the lock but did not release it. // We decide whether to retry by checking lock_may_be_available() // Since this will break the lock in case it is expired. $retry = $retry ? FALSE : lock_may_be_available($name); } // We only retry in case the first attempt failed, but we then broke // an expired lock. } while ($retry); } return isset($locks[$name]); } /** * Check if lock acquired by a different process may be available. * * If an existing lock has expired, it is removed. * * @param $name * The name of the lock. * @return * TRUE if there is no lock or it was removed, FALSE otherwise. */ function lock_may_be_available($name) { $lock = db_fetch_array(db_query("SELECT expire, value FROM {semaphore} WHERE name = '%s'", $name)); if (!$lock) { return TRUE; } $expire = (float) $lock['expire']; list($usec, $sec) = explode(' ', microtime()); $now = (float)$usec + (float)$sec; if ($now > $lock['expire']) { // We check two conditions to prevent a race condition where another // request acquired the lock and set a new expire time. We add a small // number to $expire to avoid errors with float to string conversion. db_query("DELETE FROM {semaphore} WHERE name = '%s' AND value = '%s' AND expire <= %f", $name, $lock['value'], 0.0001 + $expire); return (bool)db_affected_rows(); } return FALSE; } /** * Wait for a lock to be available. * * This function may be called in a request that fails to acquire a desired * lock. This will block further execution until the lock is available or the * specified delay in seconds is reached. This should not be used with locks * that are acquired very frequently, since the lock is likely to be acquired * again by a different request during the sleep(). * * @param $name * The name of the lock. * @param $delay * The maximum number of seconds to wait, as an integer. * @return * TRUE if the lock holds, FALSE if it is available. */ function lock_wait($name, $delay = 30) { while ($delay--) { // This function should only be called by a request that failed to get a // lock, so we sleep first to give the parallel request a chance to finish // and release the lock. sleep(1); if (lock_may_be_available($name)) { // No longer need to wait. return FALSE; } } // The caller must still wait longer to get the lock. return TRUE; } /** * Release a lock previously acquired by lock_acquire(). * * This will release the named lock if it is still held by the current request. * * @param $name * The name of the lock. */ function lock_release($name) { global $locks; unset($locks[$name]); db_query("DELETE FROM {semaphore} WHERE name = '%s' AND value = '%s'", $name, _lock_id()); } /** * Release all previously acquired locks. */ function lock_release_all($lock_id = NULL) { global $locks; $locks = array(); if (empty($lock_id)) { $lock_id = _lock_id(); } db_query("DELETE FROM {semaphore} WHERE value = '%s'", _lock_id()); } /** * @} End of "defgroup locks". */