From unknown Sun Jun 22 11:41:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75531: [PATCH 1/1] Added new recursive feature to the shred command Resent-From: TheJostler Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 13 Jan 2025 06:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: patch To: 75531@debbugs.gnu.org Cc: Josjuar Lister X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1736748195764 (code B ref -1); Mon, 13 Jan 2025 06:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2025 06:03:15 +0000 Received: from localhost ([127.0.0.1]:49875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tXDXe-0000CD-4j for submit@debbugs.gnu.org; Mon, 13 Jan 2025 01:03:15 -0500 Received: from lists.gnu.org ([2001:470:142::17]:45792) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tX32p-0008Rw-2V for submit@debbugs.gnu.org; Sun, 12 Jan 2025 13:50:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tX32g-0001w8-Rd for bug-coreutils@gnu.org; Sun, 12 Jan 2025 13:50:35 -0500 Received: from fly.ash.relay.mailchannels.net ([23.83.222.61]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tX32c-0000Hg-U0 for bug-coreutils@gnu.org; Sun, 12 Jan 2025 13:50:32 -0500 X-Sender-Id: hostingeremail|x-authuser|josj@tegosec.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 71C1D23DC2 for ; Sun, 12 Jan 2025 18:50:27 +0000 (UTC) Received: from nl-srv-smtpout3.hostinger.io (trex-3.trex.outbound.svc.cluster.local [100.109.47.111]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id C56A423CF9 for ; Sun, 12 Jan 2025 18:50:26 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1736707827; a=rsa-sha256; cv=none; b=pgsZY8/I8H1CF00b46G94Yez1eruEHjbqAqhpaDs9FuspM++XceqHVVP8MTqDACKMZWH0/ hHz8KnV9uZRrnM33uq/O+hNosozly+BLqYtrP/MjG4/Catn4nFNZ1OyL0WP2hITuxzpDRa JsGEvQzbdXrBQfopyXPFesY8OwArMFmDaT144NVjhoh4HjO++9d7kqEkLbQXc/CKSy2iYG s2F3lj7qPpDBHY4DcSYlutj96R8tJ2Hbk+WINlfnySUcURyeHI720CK5OOJextauKj0/C+ JA0U8gvNCmO7lDplgAEUgPZfmDPIT2DvxZO00FusMJcHvHpjxeXxgFD27VQicQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1736707827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=apI8+KdjaYwpn1aFgaY0h65E1oEQbDhcSdS+WriBHf0=; b=AuJEsjMf7uYOIIw+Rp0DpfCerMenMtkYiP8Zg2eA2l35bWtQ0biL+/9qzipGh7WSlVTOOD 4KPz2/VWMAiIApmNqjN4kRuPXXWLaxO8ccHRnWP3DiiepFeZauwD/rGN7X2BbjojviCEZ8 XQboe0mLH68UUjmiiaWwAQ10T1MY9vnCkvJhVbGRcMnLZ+ZrreybnvTgNseHdDIGDEUigS AJZbhyFUfReTjnoyET2hcnUnb+9tDM17ajs+KXeL8Lke7NcE78AWkLjgpqJIFlHF3joB6K 8IIfNb2s4JuS50L18CoU/n7Gx+mdbnggsclkta0/yD4ZqsaRwdBjH15g5tmjMg== ARC-Authentication-Results: i=1; rspamd-b5645c5d4-mkwsw; auth=pass smtp.auth=hostingeremail smtp.mailfrom=josj@tegosec.com X-Sender-Id: hostingeremail|x-authuser|josj@tegosec.com X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|josj@tegosec.com X-MailChannels-Auth-Id: hostingeremail X-Towering-Trail: 6f3cceac5bad0ce9_1736707827316_256015485 X-MC-Loop-Signature: 1736707827316:2351129872 X-MC-Ingress-Time: 1736707827316 Received: from nl-srv-smtpout3.hostinger.io (nl-srv-smtpout3.hostinger.io [145.14.159.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.109.47.111 (trex/7.0.2); Sun, 12 Jan 2025 18:50:27 +0000 From: TheJostler DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tegosec.com; s=hostingermail-a; t=1736707824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=apI8+KdjaYwpn1aFgaY0h65E1oEQbDhcSdS+WriBHf0=; b=aEJw/3ZXjfTJxKcSYSf3U34QJq+qySDk9mGKEHW6TNUDYyQOt6D8AR4ZCefhlucjfOK0JD j6hdwFCyf7CLyrKKB0sWzECh1RuMifZUG659hbh1MCIycl28zetmd+kSzEUq2iJt6k5pAD iuZvzSvSrHOuvWh906slHBYeS6B8aSAgWmK7prJueLx2ZxsOFFtopRSFYHjbhLCaH0UTSU CBYBL+s2bIgrY4c7Mwbx03jSKmEYwEL6Srw/8WFGuYBgAljHMXA3phgljIkGVOwqDpVvN+ 8mQLmO3LPVk8DfvAQToxCSEk8/HEwp4GCewiDUE/3dnmh/utXuqy1IH/fy5KyQ== Message-Id: <20250112185020.124684-2-josj@tegosec.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250112185020.124684-1-josj@tegosec.com> References: <20250112185020.124684-1-josj@tegosec.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Sun, 12 Jan 2025 18:50:24 +0000 (UTC) X-CM-Analysis: v=2.4 cv=XvmoOkF9 c=1 sm=1 tr=0 ts=67840ef0 a=LywaJTgNNuxJhQZtKkHN1Q==:117 a=LywaJTgNNuxJhQZtKkHN1Q==:17 a=bAK8nNZbAAAA:8 a=IlWtQLDfXSg6abpHIbEA:9 a=5gdiso8aKJOKwWEKjupo:22 X-CM-Envelope: MS4xfBFzHYbHgO6SevSb0T591nc1dHxcdQBbxJVWqo83rMD0GJICxjQcJ/AHc1DiubBLX7UstrzeAcvlDEjEpMNAE0q9wHBu/Syh7mnfL6AhvTiHm4jh9mev FM43bLDfb/a0hoSrZ6osp3OeLPTgGsui1+4/6pzs8OgOrCau+BR3vSyRlMMpm4llsm4VdA/D5A4smrIFs7n9TVvqXjVOZLVdo50qfN0710qeU1kM34lXiA4/ X-AuthUser: josj@tegosec.com Received-SPF: pass client-ip=23.83.222.61; envelope-from=josj@tegosec.com; helo=fly.ash.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Mon, 13 Jan 2025 01:03:13 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) From: Josjuar Lister --- src/shred.c | 111 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 97 insertions(+), 14 deletions(-) diff --git a/src/shred.c b/src/shred.c index 03a260243..c824fc495 100644 --- a/src/shred.c +++ b/src/shred.c @@ -128,6 +128,7 @@ static enum remove_method const remove_methods[] = struct Options { + bool recursive; /* -r flag: shred files and directories recursively */ bool force; /* -f flag: chmod files if necessary */ size_t n_iterations; /* -n flag: Number of iterations */ off_t size; /* -s flag: size of file */ @@ -179,6 +180,7 @@ If FILE is -, shred standard output.\n\ emit_mandatory_arg_note (); printf (_("\ + -r, --recursive shred files and directories recursively\n\ -f, --force change permissions to allow writing if necessary\n\ -n, --iterations=N overwrite N times instead of the default (%d)\n\ --random-source=FILE get random bytes from FILE\n\ @@ -1035,6 +1037,7 @@ incname (char *name, size_t len) static bool wipename (char *oldname, char const *qoldname, struct Options const *flags) { + printf("wipename\n"); char *newname = xstrdup (oldname); char *base = last_component (newname); char *dir = dir_name (newname); @@ -1079,13 +1082,28 @@ wipename (char *oldname, char const *qoldname, struct Options const *flags) } } - if (unlink (oldname) != 0) + struct stat statbuf; + if (stat(oldname, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) { - error (0, errno, _("%s: failed to remove"), qoldname); - ok = false; + if (rmdir(oldname) != 0) + { + error(0, errno, _("%s: failed to remove directory"), qoldname); + ok = false; + } + else if (flags->verbose) + error(0, 0, _("%s: removed directory"), qoldname); } - else if (flags->verbose) - error (0, 0, _("%s: removed"), qoldname); + else + { + if (unlink (oldname) != 0) + { + error (0, errno, _("%s: failed to remove"), qoldname); + ok = false; + } + else if (flags->verbose) + error (0, 0, _("%s: removed"), qoldname); + } + if (0 <= dir_fd) { if (dosync (dir_fd, qdir) != 0) @@ -1138,11 +1156,73 @@ wipefile (char *name, char const *qname, error (0, errno, _("%s: failed to close"), qname); ok = false; } + printf("remove_file: %u, Ok: %i\n", flags->remove_file, ok); if (ok && flags->remove_file) ok = wipename (name, qname, flags); return ok; } +/* Wrapper for handling files simplifies the recursive function */ +static bool +handle_file (char *name, struct randint_source *s, struct Options const *flags, bool ok) +{ + char *qname = xstrdup (quotef (name)); + if (STREQ (name, "-")) + { + ok &= wipefd (STDOUT_FILENO, qname, s, flags); + } + else + { + /* Plain filename - Note that this overwrites *argv! */ + ok &= wipefile (name, qname, s, flags); + } + free (qname); + return ok; +} + + +/* Directory wiping */ +static bool +wipe_directory (char *name, struct randint_source *s, struct Options const *flags, bool ok) +{ + DIR *dir; + struct dirent *entry; + struct stat statbuf; + char path[PATH_MAX]; + + if (!(dir = opendir(name))) + { + error (0, errno, _("cannot open directory %s"), name); + return false; + } + + while ((entry = readdir(dir)) != nullptr) + { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; + + snprintf(path, sizeof(path), "%s/%s", name, entry->d_name); + if (lstat(path, &statbuf) == -1) + { + error (0, errno, _("cannot stat %s"), path); + continue; + } + + if (S_ISDIR(statbuf.st_mode)) + { + if (!wipe_directory(path, s, flags, ok)) + return false; + } + else + { + handle_file(path, s, flags, ok); + } + } + if (flags->remove_file) + ok &= wipename(name, name, flags); + closedir(dir); + return ok; +} /* Buffers for random data. */ static struct randint_source *randint_source; @@ -1168,7 +1248,6 @@ main (int argc, char **argv) int i; char const *random_source = nullptr; - initialize_main (&argc, &argv); set_program_name (argv[0]); setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); @@ -1179,10 +1258,14 @@ main (int argc, char **argv) flags.n_iterations = DEFAULT_PASSES; flags.size = -1; - while ((c = getopt_long (argc, argv, "fn:s:uvxz", long_opts, nullptr)) != -1) + while ((c = getopt_long (argc, argv, "rfn:s:uvxz", long_opts, nullptr)) != -1) { switch (c) { + case 'r': + flags.recursive = true; + flags.remove_file = remove_wipesync; + break; case 'f': flags.force = true; break; @@ -1249,21 +1332,21 @@ main (int argc, char **argv) quotef (random_source ? random_source : "getrandom")); atexit (clear_random_data); + struct stat statbuf; for (i = 0; i < n_files; i++) { - char *qname = xstrdup (quotef (file[i])); - if (STREQ (file[i], "-")) + if (stat(file[i], &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) { - ok &= wipefd (STDOUT_FILENO, qname, randint_source, &flags); + if (! ok){ + continue; + } + ok &= wipe_directory (file[i], randint_source, &flags, ok); } else { - /* Plain filename - Note that this overwrites *argv! */ - ok &= wipefile (file[i], qname, randint_source, &flags); + ok &= handle_file (file[i], randint_source, &flags, ok); } - free (qname); } - return ok ? EXIT_SUCCESS : EXIT_FAILURE; } /* -- 2.39.5 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 13 02:23:03 2025 Received: (at control) by debbugs.gnu.org; 13 Jan 2025 07:23:03 +0000 Received: from localhost ([127.0.0.1]:49972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tXEmt-0003uO-5y for submit@debbugs.gnu.org; Mon, 13 Jan 2025 02:23:03 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:50382) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tXEmq-0003tU-Rw for control@debbugs.gnu.org; Mon, 13 Jan 2025 02:23:01 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 41C5D3C011BDD for ; Sun, 12 Jan 2025 23:22:55 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id ChBTDYP7xuw3 for ; Sun, 12 Jan 2025 23:22:55 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 0B1BF3C0344DE for ; Sun, 12 Jan 2025 23:22:55 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 0B1BF3C0344DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1736752975; bh=+SOyg6P0XQMOmGx3du4wF4e2/w0jyCJzCTK8fKJrViU=; h=Message-ID:Date:MIME-Version:To:From; b=XlygATOelScZEvs/YmPUGeMysNCTzznFaem85LDaoCS/Ccd7oqz5FO2sfocO26CoL UCUgf2MHh1av1Gp2SnZLQO1zBsj9fT4SRDVV9UcNPCkuwX7jXTnJSGC8vwuIuM+KMu KSs+DmFT8pcWbvvBh3W4U6CwCLDG0Bkr3+tMfByjerP8BvkHUSFBGPzSvCNsBEfyYV YEEI+LRHuoMBrU7sZou0eWplc21KP8SWU1IYGvMeCY1DP82+DtCNQ9+BkQ8ukMua5L YXILXH1vUMcYkqUFhiRlbkOww+8lIP986EGAWDo34mw6Z9h6dLDJ6BMI5WLsGUhQQA NhGCxMXbxLIhw== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id JW2ax9OPWyHg for ; Sun, 12 Jan 2025 23:22:54 -0800 (PST) Received: from [192.168.254.12] (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id E2C0B3C011BDD for ; Sun, 12 Jan 2025 23:22:54 -0800 (PST) Message-ID: <28610e5e-d0d1-4d5e-a996-c2fc65c6d877@cs.ucla.edu> Date: Sun, 12 Jan 2025 23:22:54 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: control@debbugs.gnu.org From: Paul Eggert Subject: merge 75531 75532 Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) merge 75531 75532 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 13 05:53:35 2025 Received: (at control) by debbugs.gnu.org; 13 Jan 2025 10:53:35 +0000 Received: from localhost ([127.0.0.1]:50478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tXI4d-0007om-43 for submit@debbugs.gnu.org; Mon, 13 Jan 2025 05:53:35 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:56388) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tXI4a-0007oQ-2a; Mon, 13 Jan 2025 05:53:33 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso39723135e9.0; Mon, 13 Jan 2025 02:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736765606; x=1737370406; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=jJQ6+JcDTePwbOUvj672GNPaLxF1VQSWflGIAyr9+Ew=; b=dqSvp1UG/B8Sk/94d9nkA84D18EMXXHNJRP3ELYc1FyWk0EP0aZqk0/jxjQ3JDrq3X R00CMCcwokOODgYPkCQlDqHhEleXWnb8pLAnjHKf0pHGSO54Mz05OvFdAcyvuqby6EpC UY/MPCWMiM5bFR0d2SVhkV7JucHct0YCHrHsAK7lyYi/miFmsjkaXrTT8ER1CBaQEgNz aH8JZPwYxJ5dEMsI8o0QiT9irV1Xi1+Z4BdpMDRuzuOqOISWjzYFU3ly/jTZiGTeRWeT Txy7KSNU1e8X5A9Ak57BnCDCqr/FO7tGMu9iYnNB0qQwNz9LxtNBP1itgYBhy1Zy7STa /MGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736765606; x=1737370406; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jJQ6+JcDTePwbOUvj672GNPaLxF1VQSWflGIAyr9+Ew=; b=tGR9VCdtNUUEJprKSwjOhop4+qJgZqZEROQcffpBCcwptDqePhezSTao8LkxLEmuky NP1IB3XtFUs28y252oDw4K9DaeN3cqHml7fdcNkz+a5bjp2IQj816AuYHLrPpXx6pFpA uNO4IV4S+3zWfRc7YMj3e4vsrjfMp0/54myWRCiD5h7WzTy/xhaqFwGV/TWs4dQQbV4g NmgY7qfD5JniPZtX7DNgI8aBjQEGihOD6++LFgG4Yg/3KpcC/hoWL1A66gPrDN+v7G+W 17thLPWPh7uAcYgh8/AudULh3OiN1WXQUgxv65zzCbiHFEACdLRH/3w7E0Ggr4E+mgOe mW6A== X-Forwarded-Encrypted: i=1; AJvYcCVPwe8Q7z/EVxIrwPirtNXo3QOJELevJow2bB8BUV1LFO+LYW1ElCDDufVlrmeLayI4KYL4Sw==@debbugs.gnu.org, AJvYcCXoJgV0/+roabbJ/ViKtkqAlgefWOf+Ue3f4yW0XAd4D0as8kXF1msgLOOFVkiJnuwYu7UNvil8Sw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzkhboS44yJIUyABQTAszpn4UQKt0T2IqnJaEAl9/we5CG/61Ys WKB7n4/TsOnUdvvCBqLpAf5x0GAaGwyvDCzzP1OxxsErQMQBINVu X-Gm-Gg: ASbGncuCsVIdsfqRU6SAtD38jC7Hgv5bQAyojYM62p0sBpsI0wL3DXUYKW1x/S2FKJI Cxlkm2nbWr+mLt1AFx/FR1g3Scp+fjdCFmGVznbkADkOraoxDH0bfh8/PRjtQ760Y7Y0/II99D7 IQbnsErI/tISlneyY3c4fryUXcqPRi8jVcLNOD3FeFGTblmVhGlO4V9H0sLp8r0Re2wd4qYBJCT Na2z3sRhI4eMtY3PymHZBsZtH1bgrJRAxVfjnBIPo/ZFF/luikQO5T+HXPvUwc9513OSi45Vh3e QVKRoAH9Ms4vW8QfLY9TjG7tjdZ7NP0c2JZ2 X-Google-Smtp-Source: AGHT+IE5eeTDEcOvQrhkYEQS1t0GygHNOfNG/Vf8oplY9wE1hgDvy2bPvFoqpfo5qQpWfBzOU1M88g== X-Received: by 2002:a05:6000:186b:b0:386:1cd3:8a08 with SMTP id ffacd0b85a97d-38a872d0006mr16990395f8f.5.1736765605530; Mon, 13 Jan 2025 02:53:25 -0800 (PST) Received: from [192.168.1.31] (86-44-211-146-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.146]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38a8e38f0eesm12052712f8f.61.2025.01.13.02.53.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jan 2025 02:53:25 -0800 (PST) Message-ID: <75167cd9-78af-41ce-b80d-36e578430f8e@draigBrady.com> Date: Mon, 13 Jan 2025 10:53:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: bug#75532: [PATCH 0/1] Proposed new feature for the shred command To: TheJostler , 75532@debbugs.gnu.org References: <20250112185020.124684-1-josj@tegosec.com> Content-Language: en-US From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: <20250112185020.124684-1-josj@tegosec.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tag 75532 notabug close 75532 stop details below... On 12/01/2025 18:50, TheJostler wrote: > From: Josjuar Lister > > Hello Coreutils team, > > My name is Josjuar Lister, I am a 28 year old free-lance software developer from the United Kingdom. > My main work though is System Administration and Security, and of course I'm an avid Linux user. > > Shred is a tool I often used beause I like many others, value my privacy and security. > > I've often needed to securely delete many files in a directory and its subdirectories, but shred does not have a feature to do this. > Oftentimes, I have written scripts to recursively shred files in a directory, but I think it would be useful to have this feature built into the shred command itself. > I decided to add this feature to the shred command and I have tested it to ensure it works as expected. > > I would appreciate it if you could review this patch and consider including it in the next release of coreutils. This was previously discussed at: https://www.gnu.org/software/coreutils/rejected_requests.html#shred The considerations haven't changed in the meantime, so I'm not on for applying this. thank you, Pádraig.