[Git][debian-proftpd-team/proftpd-mod-case][master] 4 commits: New upstream version 0.9.1
Hilmar Preuße (@hilmar)
gitlab at salsa.debian.org
Wed Mar 5 19:07:50 GMT 2025
Hilmar Preuße pushed to branch master at Debian ProFTPD Team / proftpd-mod-case
Commits:
1c179d0d by Hilmar Preuße at 2025-03-05T19:23:10+01:00
New upstream version 0.9.1
- - - - -
42e2776b by Hilmar Preuße at 2025-03-05T19:23:10+01:00
Update upstream source from tag 'upstream/0.9.1'
Update to upstream version '0.9.1'
with Debian dir 3685a9dfc25c24fc2da72bbe121aedc0af2d9a5d
- - - - -
c4943c9f by Hilmar Preuße at 2025-03-05T19:41:45+01:00
Lintian cleanup.
- - - - -
aa560a4c by Hilmar Preuße at 2025-03-05T19:44:06+01:00
Finalize for upload.
- - - - -
10 changed files:
- + .codeql.yml
- .github/workflows/ci.yml
- + .github/workflows/codeql.yml
- debian/changelog
- debian/control
- debian/copyright
- debian/watch
- mod_case.c
- t/lib/ProFTPD/Tests/Modules/mod_case.pm
- t/lib/ProFTPD/Tests/Modules/mod_case/sftp.pm
Changes:
=====================================
.codeql.yml
=====================================
@@ -0,0 +1,3 @@
+---
+paths:
+ - contrib/mod_case.c
=====================================
.github/workflows/ci.yml
=====================================
@@ -7,6 +7,8 @@ on:
pull_request:
branches:
- master
+ schedule:
+ - cron: '11 1 * * 0'
jobs:
build:
@@ -18,26 +20,26 @@ jobs:
- clang
- gcc
container:
- - alpine:3.14
- - centos:8
- - ubuntu:18.04
+ - almalinux:8
+ - alpine:3.18
+ - ubuntu:22.04
container: ${{ matrix.container }}
steps:
- name: Checkout ProFTPD
- uses: actions/checkout at v2
+ uses: actions/checkout at v3
with:
repository: proftpd/proftpd
path: proftpd
- name: Checkout module source code
- uses: actions/checkout at v2
+ uses: actions/checkout at v3
with:
path: proftpd-mod_case
- name: Whitespace check
- if: ${{ matrix.container == 'ubuntu:18.04' }}
+ if: ${{ matrix.container == 'ubuntu:22.04' }}
run: |
apt-get update -qq
apt-get install -y git
@@ -54,11 +56,11 @@ jobs:
cp proftpd-mod_case/mod_case.c proftpd/contrib/
- name: Install Alpine packages
- if: ${{ matrix.container == 'alpine:3.14' }}
+ if: ${{ matrix.container == 'alpine:3.18' }}
run: |
apk update
# for builds
- apk add bash build-base clang compiler-rt-static gcc make zlib-dev
+ apk add bash build-base clang compiler-rt gcc make zlib-dev
# for unit tests
apk add check check-dev subunit subunit-dev
@@ -70,17 +72,18 @@ jobs:
gcc --version
openssl version -a
- - name: Install Centos packages
- if: ${{ matrix.container == 'centos:8' }}
+ - name: Install RPM packages
+ if: ${{ matrix.container == 'almalinux:8' }}
run: |
# Need to add other repos for e.g. libsodium
- yum install -y dnf-plugins-core epel-release clang gcc make zlib-devel
- yum config-manager --set-enabled powertools
+ yum install -y dnf-plugins-core epel-release yum-utils clang gcc make zlib-devel
+ dnf config-manager --enable epel
+ dnf config-manager --set-enabled powertools
# for unit tests
yum install -y check-devel https://cbs.centos.org/kojifiles/packages/subunit/1.4.0/1.el8/x86_64/subunit-1.4.0-1.el8.x86_64.rpm https://cbs.centos.org/kojifiles/packages/subunit/1.4.0/1.el8/x86_64/subunit-devel-1.4.0-1.el8.x86_64.rpm
# for OpenSSL support
- yum install -y openssl-devel
+ yum install -y openssl openssl-devel
# for debugging
clang --version
@@ -88,7 +91,7 @@ jobs:
openssl version -a
- name: Install Ubuntu packages
- if: ${{ matrix.container == 'ubuntu:18.04' }}
+ if: ${{ matrix.container == 'ubuntu:22.04' }}
run: |
apt-get update -qq
# for builds
@@ -106,6 +109,7 @@ jobs:
libfile-copy-recursive-perl \
libfile-path-tiny-perl \
libfile-spec-native-perl \
+ libnet-inet6glue-perl \
libnet-ssh2-perl \
libnet-ssleay-perl \
libnet-telnet-perl \
@@ -127,7 +131,7 @@ jobs:
openssl version -a
- name: Prepare code coverage
- if: ${{ matrix.container == 'ubuntu:18.04' }}
+ if: ${{ matrix.container == 'ubuntu:22.04' }}
run: |
lcov --directory proftpd --zerocounters
@@ -145,7 +149,7 @@ jobs:
make install
- name: Run integration tests
- if: ${{ matrix.compiler == 'gcc' && matrix.container == 'ubuntu:18.04' }}
+ if: ${{ matrix.compiler == 'gcc' && matrix.container == 'ubuntu:22.04' }}
env:
PROFTPD_TEST_BIN: /usr/local/sbin/proftpd
PROFTPD_TEST_DIR: ${{ github.workspace }}/proftpd
=====================================
.github/workflows/codeql.yml
=====================================
@@ -0,0 +1,75 @@
+name: CodeQL
+
+on:
+ push:
+ branches:
+ - master
+ paths-ignore:
+ - '**/*.md'
+ - '**/doc/*'
+ pull_request:
+ branches:
+ - master
+ paths-ignore:
+ - '**/*.md'
+ - '**/doc/*'
+ schedule:
+ - cron: "22 7 * * 5"
+
+jobs:
+ analyze:
+ name: CodeQL Analysis
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: true
+ matrix:
+ language:
+ - cpp
+
+ steps:
+ - name: Checkout ProFTPD
+ uses: actions/checkout at v3
+ with:
+ repository: proftpd/proftpd
+
+ - name: Checkout mod_case
+ uses: actions/checkout at v3
+ with:
+ path: proftpd-mod_case
+
+ - name: Install Packages
+ run: |
+ sudo apt-get update
+
+ - name: Prepare module
+ run: |
+ cp proftpd-mod_case/mod_case.c contrib/mod_case.c
+
+ - name: Configure
+ run: |
+ ./configure --with-modules=mod_case
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init at v2
+ with:
+ languages: ${{ matrix.language }}
+ config-file: proftpd-mod_case/.codeql.yml
+ queries: +security-and-quality
+ source-root: proftpd-mod_case
+
+ - name: Build
+ run: |
+ make
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze at v2
+ with:
+ category: "/language:${{ matrix.language }}"
+ checkout_path: proftpd-mod_case
+ output: sarif-results
+ upload: true
=====================================
debian/changelog
=====================================
@@ -1,10 +1,17 @@
-proftpd-mod-case (0.9-2) UNRELEASED; urgency=medium
+proftpd-mod-case (0.9.1-1) unstable; urgency=medium
+ [ Hilmar Preuße ]
+ * New upstream version.
+ - Can be built using gcc 15 (Closes: #1097656).
+ * Bump Standards Version 4.7.2, no changes needed.
+ * Lintian cleanup.
+
+ [ Debian Janitor ]
* Remove constraints unnecessary since buster:
+ Build-Depends: Drop versioned constraint on proftpd-dev.
* debian/copyright: use spaces rather than tabs to start continuation lines.
- -- Debian Janitor <janitor at jelmer.uk> Fri, 18 Feb 2022 14:41:32 -0000
+ -- Hilmar Preuße <hille42 at debian.org> Wed, 05 Mar 2025 19:29:28 +0100
proftpd-mod-case (0.9-1) unstable; urgency=low
=====================================
debian/control
=====================================
@@ -7,7 +7,7 @@ Uploaders: Mahyuddin Susanto <udienz at gmail.com>,
Hilmar Preuße <hille42 at debian.org>
Build-Depends: debhelper-compat (= 13),
proftpd-dev
-Standards-Version: 4.6.0
+Standards-Version: 4.7.2
Rules-Requires-Root: no
Homepage: http://www.castaglia.org/proftpd/modules/mod_case.html
Vcs-Browser: https://salsa.debian.org/debian-proftpd-team/proftpd-mod-case
=====================================
debian/copyright
=====================================
@@ -26,5 +26,5 @@ License: GPL-2+
Files: debian/*
Copyright: 2011, Mahyuddin Susanto <udienz at ubuntu.com>
- 2021, Hilmar Preusse <hille42 at web.de>
+ 2021-2025, Hilmar Preuße <hille42 at debian.org>
License: GPL-2+
=====================================
debian/watch
=====================================
@@ -1,3 +1,3 @@
-version=3
+version=4
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/proftpd-mod_case-$1\.tar\.gz/ \
https://github.com/Castaglia/proftpd-mod_case/tags .*/v?(\d\S*)\.tar\.gz
=====================================
mod_case.c
=====================================
@@ -1,6 +1,6 @@
/*
* ProFTPD: mod_case -- provides case-insensivity
- * Copyright (c) 2004-2021 TJ Saunders
+ * Copyright (c) 2004-2025 TJ Saunders
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
#include "conf.h"
#include "privs.h"
-#define MOD_CASE_VERSION "mod_case/0.9"
+#define MOD_CASE_VERSION "mod_case/0.9.1"
/* Make sure the version of proftpd is as necessary. */
#if PROFTPD_VERSION_NUMBER < 0x0001030402
@@ -42,7 +42,7 @@ static int case_expr_eval_cmds(cmd_rec *cmd, array_header *list) {
int cmd_id, found;
register unsigned int i;
- for (i = 0; i < list->nelts; i++) {
+ for (i = 0; i < list->nelts; i++) {
char *c = ((char **) list->elts)[i];
found = 0;
@@ -172,6 +172,8 @@ static void case_replace_copy_paths(cmd_rec *cmd, const char *proto,
cmd->arg = pstrcat(cmd->pool, cmd->argv[1], " ", src_path, " ", dst_path,
NULL);
}
+
+ pr_cmd_clear_cache(cmd);
}
static void case_replace_link_paths(cmd_rec *cmd, const char *proto,
@@ -195,6 +197,8 @@ static void case_replace_link_paths(cmd_rec *cmd, const char *proto,
cmd->argv[1] = cmd->arg;
}
}
+
+ pr_cmd_clear_cache(cmd);
}
static void case_replace_path(cmd_rec *cmd, const char *proto, const char *path,
@@ -213,6 +217,7 @@ static void case_replace_path(cmd_rec *cmd, const char *proto, const char *path,
*/
if (path_index > 0) {
+ unsigned int i;
char *arg;
arg = pstrdup(cmd->tmp_pool, cmd->arg);
@@ -220,10 +225,23 @@ static void case_replace_path(cmd_rec *cmd, const char *proto, const char *path,
arg = pstrcat(cmd->pool, arg, path, NULL);
cmd->arg = arg;
+ /* We also need to find the index into cmd->argv to replace. Look
+ * for the first item that does not start with `-`.
+ */
+ for (i = 1; i < cmd->argc; i++) {
+ if (*((char *) cmd->argv[i]) != '-') {
+ break;
+ }
+ }
+
+ cmd->argv[i] = pstrdup(cmd->pool, path);
+
} else {
cmd->arg = pstrdup(cmd->pool, path);
}
+ pr_cmd_clear_cache(cmd);
+
} else {
char *arg, *dup_path;
array_header *argv;
@@ -318,6 +336,7 @@ static void case_replace_path(cmd_rec *cmd, const char *proto, const char *path,
pr_cmd_strcmp(cmd, "STAT") == 0) {
cmd->arg = pstrdup(cmd->pool, path);
}
+ pr_cmd_clear_cache(cmd);
return;
}
@@ -827,19 +846,20 @@ MODRET case_pre_link(cmd_rec *cmd) {
/* usage: CaseEngine on|off */
MODRET set_caseengine(cmd_rec *cmd) {
- int bool;
+ int engine;
config_rec *c;
CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL);
CHECK_ARGS(cmd, 1);
- bool = get_boolean(cmd, 1);
- if (bool == -1)
+ engine = get_boolean(cmd, 1);
+ if (engine == -1) {
CONF_ERROR(cmd, "expected Boolean parameter");
+ }
c = add_config_param(cmd->argv[0], 1, NULL);
c->argv[0] = pcalloc(c->pool, sizeof(unsigned int));
- *((unsigned int *) c->argv[0]) = bool;
+ *((unsigned int *) c->argv[0]) = engine;
return PR_HANDLED(cmd);
}
=====================================
t/lib/ProFTPD/Tests/Modules/mod_case.pm
=====================================
@@ -249,6 +249,7 @@ sub caseignore_appe {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -345,6 +346,7 @@ sub caseignore_cwd {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -477,6 +479,7 @@ sub caseignore_cwd_exact_match {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -604,6 +607,7 @@ sub caseignore_cwd_issue5 {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -736,6 +740,7 @@ sub caseignore_dele {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -828,6 +833,7 @@ sub caseignore_dele_issue5 {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -917,6 +923,7 @@ sub caseignore_mdtm {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -1003,6 +1010,7 @@ sub caseignore_mkd {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -1038,37 +1046,29 @@ sub caseignore_mkd {
my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
$client->login($setup->{user}, $setup->{passwd});
- eval { $client->mkd('TeSt.D') };
- unless ($@) {
- die("MKD TeSt.D succeeded unexpectedly");
- }
-
- my $resp_code = $client->response_code();
- my $resp_msg = $client->response_msg();
+ # Due to Issue #1639, ProFTPD now treats EEXIST errors for MKDIR
+ # requests as success.
+ my ($resp_code, $resp_msg) = $client->mkd('TeSt.D');
- my $expected = 550;
+ my $expected = 257;
$self->assert($expected == $resp_code,
test_msg("Expected response code $expected, got $resp_code"));
- $expected = 'test.d: File exists';
- $self->assert($expected eq $resp_msg,
+ $expected = 'Directory successfully created';
+ $self->assert(qr/$expected/, $resp_msg,
test_msg("Expected response message '$expected', got '$resp_msg'"));
- eval { $client->xmkd('TeSt.D') };
- unless ($@) {
- die("XMKD TeSt.D succeeded unexpectedly");
- }
-
- $resp_code = $client->response_code();
- $resp_msg = $client->response_msg();
+ ($resp_code, $resp_msg) = $client->xmkd('TeSt.D');
- $expected = 550;
+ $expected = 257;
$self->assert($expected == $resp_code,
- test_msg("Expected $expected, got $resp_code"));
+ test_msg("Expected response code $expected, got $resp_code"));
- $expected = 'test.d: File exists';
- $self->assert($expected eq $resp_msg,
- test_msg("Expected '$expected', got '$resp_msg'"));
+ $expected = 'Directory successfully created';
+ $self->assert(qr/$expected/, $resp_msg,
+ test_msg("Expected response message '$expected', got '$resp_msg'"));
+
+ $client->quit();
};
if ($@) {
$ex = $@;
@@ -1111,6 +1111,7 @@ sub caseignore_mlsd {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -1190,6 +1191,7 @@ sub caseignore_mlst {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1275,6 +1277,7 @@ sub caseignore_retr {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1320,8 +1323,9 @@ sub caseignore_retr {
}
my $buf;
- $conn->read($buf, 25);
- eval { $conn->close() };
+ while ($conn->read($buf, 25) > 0) {
+ }
+ eval { $conn->close(5) };
sleep(1);
my $resp_code = $client->response_code();
@@ -1372,6 +1376,7 @@ sub caseignore_retr_issue5 {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1418,10 +1423,10 @@ sub caseignore_retr_issue5 {
my $buf;
$conn->read($buf, 25);
- eval { $conn->close() };
-
sleep(1);
+ eval { $conn->close() };
+
my $resp_code = $client->response_code();
my $resp_msg = $client->response_msg();
$self->assert_transfer_ok($resp_code, $resp_msg);
@@ -1469,6 +1474,7 @@ sub caseignore_rmd {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -1568,6 +1574,7 @@ sub caseignore_rnfr {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1660,6 +1667,7 @@ sub caseignore_rnto {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'off',
@@ -1764,6 +1772,7 @@ sub caseignore_size {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1854,6 +1863,7 @@ sub caseignore_stat {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1941,6 +1951,7 @@ sub caseignore_stor {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -2049,6 +2060,7 @@ sub caseignore_stor_filename_with_spaces {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -2157,6 +2169,7 @@ sub caseignore_stor_issue5 {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -2257,6 +2270,7 @@ sub caseignore_list {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -2375,6 +2389,7 @@ sub caseignore_list_filename_with_spaces {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -2499,6 +2514,7 @@ sub caseignore_list_no_matches {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -2625,6 +2641,7 @@ sub caseignore_list_issue5 {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -2744,6 +2761,7 @@ sub caseignore_nlst {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -2862,6 +2880,7 @@ sub caseignore_list_extlog_var_r {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
DefaultRoot => '~',
LogFormat => 'custom "%r"',
@@ -3007,6 +3026,7 @@ sub caseignore_site_chmod {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -3105,6 +3125,7 @@ sub caseignore_site_chmod_filename_with_spaces {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -3211,6 +3232,7 @@ sub caseignore_site_chgrp {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -3317,6 +3339,7 @@ sub caseignore_site_chgrp_filename_with_spaces {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -3416,6 +3439,7 @@ sub caseignore_cmds_cwd {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
IfModules => {
'mod_case.c' => {
@@ -3520,6 +3544,7 @@ sub caseignore_multi_cwds_to_dst {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
=====================================
t/lib/ProFTPD/Tests/Modules/mod_case/sftp.pm
=====================================
@@ -199,6 +199,7 @@ sub caseignore_sftp_realpath {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -334,6 +335,7 @@ sub caseignore_sftp_lstat {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -466,6 +468,7 @@ sub caseignore_sftp_setstat {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -601,6 +604,7 @@ sub caseignore_sftp_opendir {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -764,6 +768,7 @@ sub caseignore_sftp_stat {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -899,6 +904,7 @@ sub caseignore_sftp_readlink {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1025,6 +1031,7 @@ sub caseignore_sftp_symlink_src {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1158,6 +1165,7 @@ sub caseignore_sftp_symlink_src_issue5 {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1302,6 +1310,7 @@ sub caseignore_sftp_symlink_dst {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1445,6 +1454,7 @@ sub caseignore_sftp_symlink_dst_issue5 {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1567,6 +1577,7 @@ sub caseignore_sftp_download {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1718,6 +1729,7 @@ sub caseignore_sftp_upload {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1849,6 +1861,7 @@ sub caseignore_sftp_mkdir {
AuthUserFile => $setup->{auth_user_file},
AuthGroupFile => $setup->{auth_group_file},
+ AuthOrder => 'mod_auth_file.c',
AllowOverwrite => 'on',
AllowStoreRestart => 'on',
@@ -1916,20 +1929,17 @@ sub caseignore_sftp_mkdir {
die("Can't use SFTP on SSH2 server: [$err_name] ($err_code) $err_str");
}
+ # Due to Issue #1639, ProFTPD now treats EEXIST errors for MKDIR
+ # requests as success.
my $res = $sftp->mkdir('TeSt.D');
- if ($res) {
- die("MKDIR TeSt.D succeeded unexpectedly");
+ unless ($res) {
+ my ($err_code, $err_name) = $sftp->error();
+ die("Can't mkdir TeSt.D: [$err_name] ($err_code)");
}
- my ($err_code, $err_name) = $sftp->error();
-
$sftp = undef;
$ssh2->disconnect();
- my $expected = 'SSH_FX_FAILURE';
- $self->assert($expected eq $err_name,
- test_msg("Expected error '$expected', got '$err_name'"));
-
if ($^O ne 'darwin') {
# Avoid this check on Mac OSX, due to its default case-insensitve
# (but case-preserving) filesystem. Yuck.
View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd-mod-case/-/compare/7ba26c7472695b1bb296764d39fd9e735c3ff0a8...aa560a4cd4a6f76d44a576dd8ee653118de3ec56
--
View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd-mod-case/-/compare/7ba26c7472695b1bb296764d39fd9e735c3ff0a8...aa560a4cd4a6f76d44a576dd8ee653118de3ec56
You're receiving this email because of your account on salsa.debian.org.
More information about the Pkg-proftpd-maintainers
mailing list