system installation – Ubuntu 18.04 – debian installer (preseed) not respecting max size on partitions

I am using preseed to do an unattended install of Ubuntu 18.04 using the following recipe, but it ends up with the lv_swap partition filling up the disk and it ends up with 60+GB.

How can I make the partitions respect the size described on the recipe:
1 GB /boot
20GB / (LVM)
20GB /var (LVM)
4 GB swap (LVM)
rest would be free space on LVM to be used later

d-i partman-auto/expert_recipe string
boot-root ::
1 1 1 free
$bios_boot{ }
method{ biosgrub }
.
1024 1024 1024 ext4
$primary{ }
$bootable{ }
method{ format } format{ }
use_filesystem{ } filesystem{ ext4 }
mountpoint{ /boot }
.
20480 20480 20480 ext4
$lvmok{ }
method{ format } format{ }
use_filesystem{ } filesystem{ ext4 }
mountpoint{ / }
lv_name{ lv_root }
.
20480 20480 20480 ext4
$lvmok{ }
method{ format } format{ }
use_filesystem{ } filesystem{ ext4 }
mountpoint{ /var }
lv_name{ lv_var }
.
4096 4096 4096 linux-swap
$lvmok{ }
method{ swap } format{ }
lv_name{ lv_swap }
.

Thank you!

8 – systemAdminMenuBlockPage callback now respecting menu link permissions

I added a custom permission on “admin/commerce/config” to disable access for certain user roles.

class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    $events(RoutingEvents::ALTER) = 'onAlterRoutes';
    return $events;
  }

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
      if ($route = $collection->get('commerce.configuration')) {
        $route->setRequirements(('_permission' => 'administer commerce configuration'));
      }
  }
}

The page can now only be accessed when user has the permissions ‘administer commerce configuration’. But it is still visible on the “admin/commerce” page.
The page url’s are build by the systemAdminMenuBlockPage callback. The function getAdminBlock (core/modules/system/src/SystemManager.php) builds the menu and has a $element->access->isAllowed function,but this keep returning 1. And so its still printed on the overview page.

Any suggestions for fixing this issue?

greylisting – Is postfix respecting greylist response?

I”m a bit confused about the activity in my mail server logs (addresses and destination redacted for privacy):

Nov  1 21:00:03 mail postfix/smtp(745742): Trusted TLS connection established to mx.example.com(192.168.0.1):25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Nov  1 21:00:10 mail postfix/smtp(745742): 0C1551DC073: to=<johndoe@example.com>, relay=mx.example.com(192.168.0.1):25, delay=7.3, delays=0.01/0.01/0.42/6.9, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 7E42A921A9A25)
Nov  1 21:00:11 mail postfix/smtp(745829): Trusted TLS connection established to mx.example.com(192.168.0.1):25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Nov  1 21:00:18 mail postfix/smtp(745829): 903371DC08B: host mx.example.com(192.168.0.1) said: 451 4.7.1 Greylisting in action, please come back later (in reply to end of DATA command)
Nov  1 21:00:18 mail postfix/smtp(745829): Trusted TLS connection established to mx.example.net(192.168.0.2):25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Nov  1 21:00:25 mail postfix/smtp(745829): 903371DC08B: to=<janedoe18@example.ca>, relay=mx.example.net(192.168.0.2):25, delay=16, delays=0.01/1.4/7.7/7.2, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BB99F922EC625)

It appears postfix got a greylist response on the second mail to the domain in question but then immediately re-attempted delivery to a different MX record ip (@21:00:18)? Am I misunderstanding what’s going on here?

All settings are more or less default with these exceptions:

minimal_backoff_time = 180s
maximal_backoff_time = 3h

I want to make sure we are respecting the recipient provider’s response but it doesn’t appear that postfix waited 180 seconds before reattempting delivery as I would have expected.

website design – What term denotes “respecting dark and light themes”?

If my website displays appropriately on a wide variety of screen sizes, I would say, “My website is responsive.”

In a similar spirit, if my website respects the user’s choice of light theme vs dark theme and displays differently in accordance with that, I would like to say, “My website is ____.” What word can I fill in this blank?

There is some nuance here in terms of how I let the user choose the theme. I can either add a toggle on my website that the user can click, or I can infer the preference from the User-Agent (@media (prefers-color-scheme: dark)). Let me know if the term only applies to one of these situations, or if there are different terms for these two situations.

If there isn’t a term specifically for light vs dark, is there a more general term that says that my website displays differently based on something other than just size.

website design – Term for respecting dark and light themes

If my website displays appropriately on a wide variety of screen sizes, I would say, “My website is responsive.”

In a similar spirit, if my website respects the user’s choice of light theme vs dark theme and displays differently in accordance with that, I would like to say, “My website is ____.” What word can I fill in this blank?

There is some nuance here in terms of how I let the user choose the theme. I can either add a toggle on my website that the user can click, or I can infer the preference from the User-Agent (@media (prefers-color-scheme: dark)). Let me know if the term only applies to one of these situations, or if there are different terms for these two situations.

If there isn’t a term specifically for light vs dark, is there a more general term that says that my website displays differently based on something other than just size.

Windows 10 IPSec VPN not respecting configured parameters (notably: encryption method)

I am currently trying to establish a VPN connection from my Windows 10 Enterprise 1909 to a remote VPN gateway, using the built-in Windows VPN / IPSec client. Since the UI does not provide all options I need, I have created and fine-tuned the VPN connection with Powershell (using an account with Administrator rights):

Set-VpnConnection -Name Test -AllUserConnection -ServerName other.vpn.gateway -TunnelType Ikev2 -AuthenticationMethod MachineCertificate -EncryptionLevel Required
Set-VpnConnectionIPsecConfiguration -ConnectionName Test -AuthenticationTransformConstants GCMAES256 -CipherTransformConstants GCMAES256 -EncryptionMethod GCMAES256 -IntegrityCheckMethod SHA384 -PfsGroup PFS2048 -DHGroup Group14 -AllUserConnection

I’ve been very surprised that Windows obviously offers GCMAES256 where it matters; please note that I haven’t typed the encryption method etc. manually, but got them from the proposals Powershell ISE offers after having typed an argument.

However, when I dial that VPN connection, Windows claims that there is a “Policy match error”. A quick investigation on the remote gateway showed that Windows sends wrong IKEv2 proposals:

We (responder) are not behind a NAT. NAT-T is already enabled
+IKE-SA:
  IKE-Proposal-1  (4 transforms)
    ENCR : AES-CBC-256
    PRF  : PRF-HMAC-SHA1
    INTEG: HMAC-SHA1
    DH   : 14
  IKE-Proposal-2  (4 transforms)
    ENCR : AES-CBC-256
    PRF  : PRF-HMAC-SHA-256
    INTEG: HMAC-SHA-256
    DH   : 14
  IKE-Proposal-3  (4 transforms)
    ENCR : AES-CBC-256
    PRF  : PRF-HMAC-SHA-384
    INTEG: HMAC-SHA-384
    DH   : 14
-Could not match any proposal. See VPN-Debug trace for more information

So Windows sends three proposals, and all of them are wrong. For example, in my Powershell commands, I have explicitly told it to use GCMAES256 for encryption, but obviously, Windows insists on and proposes AES256-CBC.

Could somebody please explain whether this is a bug in Windows or whether I am doing something wrong. Do I have to enable GCMAES256 in Windows somehow?

Furthermore, why does Windows propose SHA1 and SHA-256 (proposals 1 and 2 in the above code) while I have explicitly told it to use SHA-384?

( Side note: Of course, I could enable AES256-CBC on the remote gateway, but I am considering this only a last resort. I really would like to know what is going on at the Windows side. )

wp.editor.initialise not respecting editor-style.css

It seems when loading an editor with the JavaScript API, editor styles are not respected like they are when it’s loaded with PHP. The documentation on the JS API for the editor seems vague to me but I’m assuming there’s a parameter I’m missing. Still, looking into but wondered if anyone else ran into a fix for this?

A note that this is part of a proprietary builder and the editor is loaded multiple times on the page.

My current code is:

<?php
/**
 * Outputs a WYSIWYG TinyMCE editor with support for shortcodes.
 *
 * @since 1.0.0
 */
public function editor( $name, $id, $option, $args ) {

    wp_enqueue_editor();
    wp_enqueue_media();

    $default = isset( $args('default') ) ? $args('default') : '';
    $option = ! empty( $option ) ? $option : $default;
    $id_parts = explode( '_', $id );
    $textarea_name = $id_parts(0) . '_' . $id_parts(1) . '(' . $id_parts(2) . ')(' . $id_parts(3) . ')';
    ?>
    <textarea class="wp-editor-area" rows="10" autocomplete="off" cols="40" name="<?php echo esc_attr( $textarea_name ); ?>" id="<?php echo esc_attr( $id ); ?>"><?php echo wp_kses_post( $option ); ?></textarea>
    <?php
    add_action( 'admin_footer', function () use ( $id ) {
        ?>
        <script>
        document.addEventListener( 'DOMContentLoaded', () => {
            wp.editor.initialize(
                <?php echo wp_json_encode( $id ); ?>, {
                    tinymce: {
                        wpautop: true,
                        height: 'auto',
                        block_formats: 'Paragraph=p; Heading 2=h2; Heading 3=h3; Heading 4=h4; Heading 5=h5; Heading 6=h6; Preformatted=pre',
                        plugins: 'charmap colorpicker compat3x directionality fullscreen hr image lists media paste tabfocus textcolor wordpress wpautoresize wpdialogs wpeditimage wpemoji wpgallery wplink wptextpattern wpview',
                        toolbar1: 'formatselect bold italic bullist numlist blockquote alignleft aligncenter alignright link wp_more wp_adv'
                    },
                    quicktags: true,
                    mediaButtons: true
                }
            );
        } );
        </script>
        <?php
    }, 100 );
}

legal – Scraping race results while respecting GDPR

I want to write a little scraper to centralise public race results (cycling + running) while keeping in mind EU GDPR rules (no storing of personal info; full name, in my case).

User will register and (hopefully) will provide real, full name, which he/she used in races throughout the years (consent).

My two solutions are:

  1. Scrape every known race, store all results in my own DB, while normalising and encrypting each username with SHA2. Racer name will be the decrypting key when he/she offers consent to do so.

  2. Scrape each username on the fly after he/she offered consent (a.k.a. registered); or even do this in batch (e.g. daily) for several users.

Problems:

  • Data is really sparse (dedicated timing sites, PDFs, XLSs, ZIP files etc.) so solution nr.1 would be easiest
  • Given the ‘private’ info problem, this won’t be a huge paid app; and I’m even wondering if someone would bother to take legal action against my small pro-bono app.

Suggestions?

Do people raised by single mothers have a hard time respecting authorities such as God or police officers when they grow up?

I know liberalism teaches that a marriage can consist¬† of two men or two women… Well, a woman in France married a bridge!

However the reality is that marriage can only take place between one man and one woman.. as the etymology of the word “matrimony” indicates..

Husbands are the leaders of the household whereas wives are the nurturers. Children raised by single mothers don’t know what it means to follow orders and to obey leaders since they never had a father… As a result children of single mothers tend to dislike authorities such as God or police officers. Children of single mothers are unable to comprehend that our actions always come accompanied with consequences… They are unable to understand that if we do something bad then in order to make things fair, we must receive a punishment…¬†

Do people raised by single mothers have a hard time respecting authorities such as God or police officers when they grow up?