Current File : //scripts/update_mailman_cache
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/update_mailman_cache            Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

package scripts::update_mailman_cache;

use strict;
use warnings;
use Cpanel::Config::LoadCpConf ();
use Cpanel::Config::Users      ();
use Cpanel::CachedDataStore    ();
use Cpanel::Mailman::Filesys   ();

use Cpanel::DatastoreDir        ();
use Cpanel::DatastoreDir::Init  ();
use Cpanel::UserDatastore       ();
use Cpanel::UserDatastore::Init ();

require Cpanel::Mailman::DiskUsage;
require Cpanel::Mailman::NameUtils;
require Cpanel::Config::FlushConfig;
require Cpanel::Config::LoadConfig;
require Cpanel::AcctUtils::DomainOwner::Tiny;
require Cpanel::PwCache;
require Cpanel::SafeFile;
require Cpanel::Finally;
require Cpanel::Timezones;

my $missing_info_mail_list = {};
my $MAILMAN_DISK_USAGE_REF = {};
my $MAILMAN_LIST_USAGE_REF = {};

my $message      = undef;
my $alert_status = undef;

exit( __PACKAGE__->run(@ARGV) ) unless caller();

sub run {    ## no critic qw(Subroutines::ProhibitExcessComplexity)
    my ( $self, @args ) = @_;

    # We call localtime quote a bit, lets make it a bit faster
    local $ENV{'TZ'} = Cpanel::Timezones::calculate_TZ_env();

    my $cpanel_conf  = Cpanel::Config::LoadCpConf::loadcpconf_not_copy();
    my $NEEDDISKUSED = exists $cpanel_conf->{'disk_usage_include_mailman'} ? $cpanel_conf->{'disk_usage_include_mailman'} : 1;

    if ( !$NEEDDISKUSED ) {
        clear_db_caches();
        return 0;
    }

    my $datastore_path          = Cpanel::DatastoreDir::Init::initialize();
    my $missing_info_yaml_file  = "$datastore_path/mailman_missing_info_mail_list.yaml";
    my $mailman_list_usage_file = _mailman_list_usage_file();
    my $mailman_disk_usage_file = _mailman_disk_usage_file();
    my $progress_file           = "$datastore_path/update_mailman_cache-in-progress";

    my ( $user_to_rebuild, $list_to_rebuild ) = @args;

    if ( $user_to_rebuild && !Cpanel::PwCache::getpwnam_noshadow($user_to_rebuild) ) {
        die "Usage: $0 <user> [<list>]\n";
    }

    my $mmlock = Cpanel::SafeFile::safeopen( my $fh, '>', $progress_file );
    if ( !$mmlock ) {
        warn "Could not get a lock on '$progress_file': $!\n";
        return 1;
    }

    my $finally = Cpanel::Finally->new( sub { unlink($progress_file); Cpanel::SafeFile::safeclose( $fh, $mmlock ); } );

    $missing_info_mail_list = Cpanel::CachedDataStore::fetch_ref($missing_info_yaml_file);
    $MAILMAN_LIST_USAGE_REF = Cpanel::CachedDataStore::fetch_ref($mailman_list_usage_file);

    Cpanel::AcctUtils::DomainOwner::Tiny::build_domain_cache();
    if ($user_to_rebuild) {

        # load disk usage for all other users
        $MAILMAN_DISK_USAGE_REF = Cpanel::Config::LoadConfig::loadConfig( $mailman_disk_usage_file, undef, ':\s+' );

        # reset disk usage for current user ( will be computed later )
        #   need to be deleted from hash as we do not want to save 0 in disk-usage
        delete $MAILMAN_DISK_USAGE_REF->{$user_to_rebuild};
    }

    my %SEEN_LISTS;
    if ( opendir( my $list_dir_dh, Cpanel::Mailman::Filesys::MAILING_LISTS_DIR() ) ) {
        my $listuser;
        while ( my $list = readdir($list_dir_dh) ) {
            next if index( $list, '.' ) == 0;
            $SEEN_LISTS{$list} = 1;
            if ( index( $list, '_' ) != -1 ) {
                ## takes advantage of the first .* being greedy; e.g. my_list_name_domain.com
                ##   will appropriately split my_list_name and domain.com
                my ( $listname, $listdomain ) = Cpanel::Mailman::NameUtils::parse_name($list);
                $listuser = Cpanel::AcctUtils::DomainOwner::Tiny::getdomainowner( $listdomain, { 'default' => '' } );
            }
            else {
                $listuser = '';
            }
            if ( !$listuser ) {
                $listuser = 'root' if $list eq 'mailman';
            }

            if ( !$listuser ) {

                # When detecting no listuser, only provide warning message once on the first time
                # (The mailing list without the listuser info is added to the yaml file
                # to prevent redundant notification on subsequent runs.)
                $alert_status = 'provided message';
                if ( !( exists( $missing_info_mail_list->{$list} ) && $missing_info_mail_list->{$list}->{'alert_status'} eq $alert_status ) ) {
                    $message = "Could not determine the list owner for mailman mailing list \"$list\"";
                    _warn_about_list_owner($message);
                    $missing_info_mail_list->{$list}->{'alert_status'} = $alert_status;
                    $missing_info_mail_list->{$list}->{'message'}      = $message;
                }

                next;
            }

            # skip other users ( usage comes from previous file ) when a user is defined
            if ( $user_to_rebuild && $listuser ne $user_to_rebuild ) { next; }

            my $disk_used;

            if ( exists $MAILMAN_LIST_USAGE_REF->{$listuser}{$list} && ( $list_to_rebuild && $list ne $list_to_rebuild ) ) {

                # Use previous value if we are only rebuilding a specific list
                $disk_used = $MAILMAN_LIST_USAGE_REF->{$listuser}{$list};
            }
            else {
                $disk_used = Cpanel::Mailman::DiskUsage::get_mailman_archive_dir_disk_usage($list) + Cpanel::Mailman::DiskUsage::get_mailman_archive_dir_mbox_disk_usage($list) + Cpanel::Mailman::DiskUsage::get_mailman_list_dir_disk_usage($list);
                $MAILMAN_LIST_USAGE_REF->{$listuser}{$list} = $disk_used;
            }
            $MAILMAN_DISK_USAGE_REF->{$listuser} += $disk_used;
        }

        if ( !Cpanel::CachedDataStore::store_ref( $missing_info_yaml_file, $missing_info_mail_list, { mode => 0600 } ) ) {
            warn "Error: Unable to save yaml file \"$missing_info_yaml_file\". \n";
        }

    }

    foreach my $user ( $user_to_rebuild ? ($user_to_rebuild) : Cpanel::Config::Users::getcpusers() ) {
        my $user_datastore_path = Cpanel::UserDatastore::Init::initialize($user);

        if ( my @deleted_lists = map { !$SEEN_LISTS{$_} } keys %{ $MAILMAN_LIST_USAGE_REF->{$user} } ) {
            delete @SEEN_LISTS{@deleted_lists};
        }
        if ( !exists $MAILMAN_LIST_USAGE_REF->{$user} || !scalar keys %{ $MAILMAN_LIST_USAGE_REF->{$user} } ) {
            delete $MAILMAN_LIST_USAGE_REF->{$user};
            unlink $user_datastore_path . '/mailman-disk-usage', $user_datastore_path . '/mailman-list-usage';
            next;
        }

        if ( open( my $disk_usage_fh, '>', $user_datastore_path . '/mailman-disk-usage' ) ) {
            print {$disk_usage_fh} int( $MAILMAN_DISK_USAGE_REF->{$user} || 0 );
            close($disk_usage_fh);
        }
        Cpanel::Config::FlushConfig::flushConfig( $user_datastore_path . '/mailman-list-usage', $MAILMAN_LIST_USAGE_REF->{$user}, ': ', undef, { perms => 0644 } );
    }

    my $umask = umask(0027);
    Cpanel::Config::FlushConfig::flushConfig( $mailman_disk_usage_file, $MAILMAN_DISK_USAGE_REF, ': ', undef, { perms => 0600 } );
    Cpanel::CachedDataStore::store_ref( $mailman_list_usage_file, $MAILMAN_LIST_USAGE_REF, { mode => 0600 } );
    umask($umask);

    return 0;
}

sub _mailman_list_usage_file {
    my $datastore_path = Cpanel::DatastoreDir::PATH();
    return "$datastore_path/mailman-list-usage.yaml";
}

sub _mailman_disk_usage_file {
    my $datastore_path = Cpanel::DatastoreDir::PATH();
    return "$datastore_path/mailman-disk-usage";
}

sub clear_db_caches {
    my $datastore_path = Cpanel::DatastoreDir::PATH();

    return if !-d $datastore_path;

    foreach my $db ( _mailman_list_usage_file(), _mailman_disk_usage_file() ) {
        unlink($db) if -e $db;
    }

    foreach my $user ( Cpanel::Config::Users::getcpusers() ) {
        my $user_datastore_path = Cpanel::UserDatastore::get_path($user);
        unlink grep { -e $_ } map { $user_datastore_path . '/' . $_ } ( 'mailman-list-usage', 'mailman-disk-usage' );
        rmdir $user_datastore_path;    # This should be safe, rmdir will fail if anything is left in the directory
    }

    return;
}

# stubbed out in tests to avoid spurious warnings
sub _warn_about_list_owner {
    my ($message) = @_;
    warn $message;
    return;
}
Porn Search engines See Free Pornography Movies & Pornstars

Porn Search engines See Free Pornography Movies & Pornstars

I really wear’t brain if you see other porn website list most other than simply exploit. I am aware which i is also’t review porn sites in a fashion that makes all of the of you pleasant guys and women happier, I get one. However, please do not use ThePornDude.

Finest Web sites Than simply ThePornDude – tainster porn

” It’s the newest locker room of the web sites, without any jockstrap smelling. Following truth be told there’s the picture and you will Movies Revealing areas—holy shag, it’s such as a buffet away from boner energy. Straight, homosexual, bi, any kind of gets the motor revving, it’s the indeed there, categorized so you wear’t occur to stumble on the certain furry guy’s ass unless you to definitely’s the jam.

This is simply not the articles!

Otherwise scrolled previous kinky ways on the DeviantArt and you can knew your’re also taking hard over hands-taken thighs? Just Jenny doing what Jenny wants, along with you slipping to your a premium take a look at to own $9.99/few days. And you can suddenly, naughty bros initiate appreciating something it familiar with forget about—emotion, realism, bulbs one to’s indeed out of a room rather than a studio.

But it addittionally has lots of niched and you will styled lists to have web site recommendations on particular kinks and aspirations. Porn Dude along with comes with suggestions for advanced amateur web sites, but we don’t suggest they. However highly recommend one totally free video clips tubing to his members, even when it’s safer or not or if perhaps he’s filled up with annoying adverts. And then he lays to people in the free gender shows for the camming networks, just in order that he would allow you to join.

tainster porn

And don’t forget, VR is approximately dream visiting life. Are you currently most going to assist weak-butt websites tainster porn cheating you out of the sense your deserve? None of my personal subscribers be satisfied with very first whenever full-to the debauchery is on the newest desk. These are mods, they’re also volunteers, maybe not some corporate prudes, so they have it—they’re also merely there to quit the real sickos. There’s as well as that it profile program, that is clutch. You rate the favorable crap, plus it floats to reach the top including cum within the a sexy tub.

They encrypt important computer data so your boss doesn’t learn you’re also to your feet otherwise almost any. Representative information remains locked down, and your uploads is your own—nobody’s promoting their selfmade sex recording in order to sketchy advertisement enterprises. The site’s hardcore on the keeping away unlawful crap too—for those who’re also dumb adequate to article kiddie porno, they’ll nuke your account and probably your heart. To join the fresh group, you need a free account. Signing up is a lot easier than taking laid during the an excellent frat home—just an email and you will an excellent username, therefore’re also within the. Modify their profile with bullshit concerning your favourite position, therefore’lso are happy to move.

However,, I will’t attest to actually all other sites I comment, while the everything is at the mercy of changes. Merely rating an antivirus and wear’t download one executable files, please. At the same time, of a lot low-conventional classes get information out of Porno Guy. If you would like Hentai, the site will get particular premium and you will free hentai online streaming hyperlinks. Sit sexy, continue exploring, rather than forget—the largest sex body organ is your notice. Lubricant one to thing up with imagination, and also you’re also ready to go.

Budget-Amicable VR Earphones One to Nevertheless Stop Butt

tainster porn

The newest website has clear categories, ranked listing, and you may small descriptions to help you discover what you’lso are searching for rather than scrolling as a result of unlimited text. The countless categories on the site will certainly feature at the least a couple of kinks you could appreciate. Although not, some of these groups ability of many links so you can lifeless sites. In the February 2016, blogger Bill Quick, creating for the amusement reports web site Egotastic, classified ThePornDude aggregator as the a good «cornucopia» out of mature sites3. Here’s the hard facts—pun extremely intended—you won’t perish instead of pornography.

Doing it yourself Articles & the rise of Amateur Systems

For many who’re not paying for it, you’ll have to put up with certain ads. However, one doesn’t indicate you have to put up with pop-ups very unpleasant that they can create your tough dick softer if you are seeking to intimate them. Concurrently, some hoses is also steal yours study. With regards to gay websites, it’s clear which he doesn’t comprehend the kink and simply writes anything they can imagine out of. Also it’s the same to your comic strip intercourse 100 percent free sites.

  • I’m able to always direct you for the most popular the new gadgets, enjoy, and brain-blowing technology just before anyone else.
  • ” It’s the brand new locker room of the sites, with no jockstrap smell.
  • It’s hot, intimate, and you may truth be told brainy.
  • At the end of a single day, you’re also perhaps not making the porn web site on the attention out of benefits – you’re also providing in order to 18-year-old virgins making use of their dick within hands.
  • The fresh listings are up coming filtered out so that precisely the best of talking about assessed and you may delivered to your own attention on the this site.

As well as the of-matter point is going to be a great snooze unless of course someone initiate a bond on the fucking aliens. But one to’s quick carrots if the others is this a. The brand new superior speed you are going to chafe certain cheapskates, but when you’re also seriously interested in your own porno games, it’s a tiny rates to pay for unlimited smut. You’ve got your current Dialogue, where males bullshit from the many techniques from its newest conquests so you can “hey, my personal dick’s itchy, what’s up?

  • Just after you to definitely’s moved, the pressure compares.
  • Will you be really likely to assist weakened-ass other sites cheat your outside of the sense your need?
  • But it addittionally is loaded with niched and you may themed lists to possess website tips about particular kinks and you can dreams.
  • Another pornography falls off the face of your internet sites, you understand just how strong the fresh desire most works.

tainster porn

They’re all seeking be loved ones-amicable which have complimentary sweaters and you will sexless grins. Instagram bans one hint away from breast. TikTok deletes is the reason the newest tip of lust. They blacklist NSFW programs such they’lso are radioactive. Specific governing bodies behave like pornography are atomic spend. Asia have prohibited and you may unbanned 800+ internet sites more moments than just We’ve changed socks.


Publicado

en

por

Etiquetas: