delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/07/19/16:55:45

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86EBF3857C54
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1595192100;
bh=+j/hM8ye9aBZgwZsLXoSpV0tqzvCHFc0aU7F7XWD6uw=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=qS7w61oj1nnWkQIgjMgqbvzxy25P/pMHtQZwHkkSlobkyLOAJPgwSGRKHc2DraPLM
FHgetGC68HPseyKw32KMkn5Y9scWpWVYluMpKwHMyMvSbmU7eb0NMmFhaNbJ4CJ4Wn
Vu8qqKXHIpp0vDGsLAU/TgjIw0MNH22bnXBFDBVc=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 72B4D3858D34
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:to:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=31THjreIX0z3fudKu5lF4utMlf/QFkQF1mFOZAk8yZM=;
b=EMqcq3WwWGTAUOghaKvoOEmZeg9bY5e/KFxHoYOKSvkawVCxeFhc7PINnVv8M70MfW
GerT4d4bmenYZ8zjhErl67wR8Kd1HBkFLchpLKMAMT+XDWycf4OrvibICYwRq5Vu9bIC
o9ciMEidqqLgsybASPbawMSjOBzIoi3W7iNvHDtFuxROaVOL9cyzTK/NQeEfa0w8tIci
v6FdBxKz+HAebkBWM0OFFve8FEzUi5IUK203yditw9nzp7eGlmsGgxdjVgqRwfJd7nm/
Ne0b1Zgs6Z4onH4MTuHrvlLo3+7nmRlURtqFhvxAyE3PG/EDtaQx/D6b2kwPYTTGsu+I
RnhA==
X-Gm-Message-State: AOAM531zSexr5YEZoQAiTpuK8AgViECmpT30jSQRh7gqUIahQTTylg9j
3KIlSb+bKkKgrK2PfXL0fiCCEIs9
X-Google-Smtp-Source: ABdhPJzca8/xRi9l3QP8Rd6W7qxaNq5qUOJynO7lUkCQoCO8SxFxotkdnU/8Tdnk2yM+xXLFEgHRWA==
X-Received: by 2002:aa7:db53:: with SMTP id n19mr19052127edt.338.1595192096125;
Sun, 19 Jul 2020 13:54:56 -0700 (PDT)
Subject: Re: Creating directories without permissions and timestamp on CYGWIN
To: cygwin AT cygwin DOT com
References: <CAK+YOwuJPW=uMoysfPb4ZD=oG8v7dh45UcOz=okOmyCn1isnOA AT mail DOT gmail DOT com>
Message-ID: <d3905024-bff7-5e7b-d793-5cabb28d7904@gmail.com>
Date: Sun, 19 Jul 2020 22:54:54 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <CAK+YOwuJPW=uMoysfPb4ZD=oG8v7dh45UcOz=okOmyCn1isnOA@mail.gmail.com>
X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SCC_5_SHORT_WORD_LINES, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 19.07.2020 21:34, Jayasurya p via Cygwin wrote:
> This was run on CYGWIN_NT-10.0 NVEBLODKIF 3.1.5(0.340/5/3) 2020-06-01 08:59
> x86_64 Cygwin
> 
> Creating a directory using mkdir API on C with 0777 permissions with the
> name having the following ASCII values causes the directory to be created
> with no user permissions and no timestamp. Length of the name is 66
> character long including the terminating NULL character.
> ASCII values of characters in the string: 96 234 195 186 63 63 50 109 4 84
> 208 246 186 170 197 33 131 113 134 209 109 251 98 226 179 93 178 32 242 189
> 236 88 14 107 134 133 93 126 210 61 194 27 209 172 244 15 12 222 9 93 10
> 149 10 235 157 42 114 125 198 182 96 240 171 164 106 0
> 
> Unit test case to replicate the scenario
> 
> #include <stdio.h>
> #include <sys/stat.h>
> #include <sys/types.h>
> 
> int main () {
> char tempPath[66] = {96, 234, 195, 186, 63, 63, 50, 109, 4, 84, 208, 246,
> 186, 170, 197, 33, 131, 113, 134, 209, 109, 251, 98, 226, 179, 93, 178, 32,
> 242, 189, 236, 88, 14, 107, 134, 133, 93, 126, 210, 61, 194, 27, 209, 172,
> 244, 15, 12, 222, 9, 93, 10, 149, 10, 235, 157, 42, 114, 125, 198, 182, 96,
> 240, 171, 164, 106, 0};
> mkdir(tempPath, 0777);
> return 1;
> }
> 

what encoding is supposed to be ?
I doubt a file name can accept a linefeed (10)

Marco



--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019