https://git.reactos.org/?p=reactos.git;a=commitdiff;h=44fb528fcc0fe0ea65bbb…
commit 44fb528fcc0fe0ea65bbbe953a015f302983a65e
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Thu Mar 25 21:48:38 2021 +0100
Commit: George Bișoc <george.bisoc(a)reactos.org>
CommitDate: Tue Apr 27 12:25:03 2021 +0200
[NTOS:SE] Implement the NtImpersonateAnonymousToken system call
Implement SepImpersonateAnonymousToken private helpers, which is necessary for the complete implementation of NtImpersonateAnonymousToken function and thus finally we're able to impersonate the anonymous logon token.
---
ntoskrnl/se/token.c | 172 ++++++++++++++++++++++++++++++++++++++++++++--
sdk/include/ndk/sefuncs.h | 2 +-
2 files changed, 168 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/se/token.c b/ntoskrnl/se/token.c
index d38fe29517e..1849a16c3a7 100644
--- a/ntoskrnl/se/token.c
+++ b/ntoskrnl/se/token.c
@@ -363,6 +363,119 @@ Quit:
return STATUS_SUCCESS;
}
+/**
+ * @brief
+ * Private function that impersonates the system's anonymous logon token.
+ * The major bulk of the impersonation procedure is done here.
+ *
+ * @param[in] Thread
+ * The executive thread object that is to impersonate the client.
+ *
+ * @param[in] PreviousMode
+ * The access processor mode, indicating if the call is executed
+ * in kernel or user mode.
+ *
+ * @return
+ * Returns STATUS_SUCCESS if the impersonation has succeeded.
+ * STATUS_UNSUCCESSFUL is returned if the primary token couldn't be
+ * obtained from the current process to perform additional tasks.
+ * STATUS_ACCESS_DENIED is returned if the process' primary token is
+ * restricted, which for this matter we cannot impersonate onto a
+ * restricted process. Otherwise a failure NTSTATUS code is returned.
+ */
+static
+NTSTATUS
+SepImpersonateAnonymousToken(
+ _In_ PETHREAD Thread,
+ _In_ KPROCESSOR_MODE PreviousMode)
+{
+ NTSTATUS Status;
+ PTOKEN TokenToImpersonate, ProcessToken;
+ ULONG IncludeEveryoneValueData;
+ PAGED_CODE();
+
+ /*
+ * We must check first which kind of token
+ * shall we assign for the thread to impersonate,
+ * the one with Everyone Group SID or the other
+ * without. Invoke the registry helper to
+ * return the data value for us.
+ */
+ Status = SepRegQueryHelper(L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\Lsa",
+ L"EveryoneIncludesAnonymous",
+ REG_DWORD,
+ sizeof(IncludeEveryoneValueData),
+ &IncludeEveryoneValueData);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("SepRegQueryHelper(): Failed to query the registry value (Status 0x%lx)\n", Status);
+ return Status;
+ }
+
+ if (IncludeEveryoneValueData == 0)
+ {
+ DPRINT("SepImpersonateAnonymousToken(): Assigning the token not including the Everyone Group SID...\n");
+ TokenToImpersonate = SeAnonymousLogonTokenNoEveryone;
+ }
+ else
+ {
+ DPRINT("SepImpersonateAnonymousToken(): Assigning the token including the Everyone Group SID...\n");
+ TokenToImpersonate = SeAnonymousLogonToken;
+ }
+
+ /*
+ * Tell the object manager that we're going to use this token
+ * object now by incrementing the reference count.
+ */
+ Status = ObReferenceObjectByPointer(TokenToImpersonate,
+ TOKEN_IMPERSONATE,
+ SeTokenObjectType,
+ PreviousMode);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("SepImpersonateAnonymousToken(): Couldn't be able to use the token, bail out...\n");
+ return Status;
+ }
+
+ /*
+ * Reference the primary token of the current process that the anonymous
+ * logon token impersonation procedure is being performed. We'll be going
+ * to use the process' token to figure out if the process is actually
+ * restricted or not.
+ */
+ ProcessToken = PsReferencePrimaryToken(PsGetCurrentProcess());
+ if (!ProcessToken)
+ {
+ DPRINT1("SepImpersonateAnonymousToken(): Couldn't be able to get the process' primary token, bail out...\n");
+ ObDereferenceObject(TokenToImpersonate);
+ return STATUS_UNSUCCESSFUL;
+ }
+
+ /* Now, is the token from the current process restricted? */
+ if (SeTokenIsRestricted(ProcessToken))
+ {
+ DPRINT1("SepImpersonateAnonymousToken(): The process is restricted, can't do anything. Bail out...\n");
+ PsDereferencePrimaryToken(ProcessToken);
+ ObDereferenceObject(TokenToImpersonate);
+ return STATUS_ACCESS_DENIED;
+ }
+
+ /*
+ * Finally it's time to impersonate! But first, fast dereference the
+ * process' primary token as we no longer need it.
+ */
+ ObFastDereferenceObject(&PsGetCurrentProcess()->Token, ProcessToken);
+ Status = PsImpersonateClient(Thread, TokenToImpersonate, TRUE, FALSE, SecurityImpersonation);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("SepImpersonateAnonymousToken(): Failed to impersonate, bail out...\n");
+ ObDereferenceObject(TokenToImpersonate);
+ return Status;
+ }
+
+ return Status;
+}
+
static
VOID
SepUpdateSinglePrivilegeFlagToken(
@@ -4304,15 +4417,64 @@ NtFilterToken(IN HANDLE ExistingTokenHandle,
return STATUS_NOT_IMPLEMENTED;
}
-/*
- * @unimplemented
+/**
+ * @brief
+ * Allows the calling thread to impersonate the system's anonymous
+ * logon token.
+ *
+ * @param[in] ThreadHandle
+ * A handle to the thread to start the procedure of logon token
+ * impersonation. The thread must have the THREAD_IMPERSONATE
+ * access right.
+ *
+ * @return
+ * Returns STATUS_SUCCESS if the thread has successfully impersonated the
+ * anonymous logon token, otherwise a failure NTSTATUS code is returned.
+ *
+ * @remarks
+ * By default the system gives the opportunity to the caller to impersonate
+ * the anonymous logon token without including the Everyone Group SID.
+ * In cases where the caller wants to impersonate the token including such
+ * group, the EveryoneIncludesAnonymous registry value setting has to be set
+ * to 1, from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa registry
+ * path. The calling thread must invoke PsRevertToSelf when impersonation
+ * is no longer needed or RevertToSelf if the calling execution is done
+ * in user mode.
*/
NTSTATUS
NTAPI
-NtImpersonateAnonymousToken(IN HANDLE Thread)
+NtImpersonateAnonymousToken(
+ _In_ HANDLE ThreadHandle)
{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+ PETHREAD Thread;
+ KPROCESSOR_MODE PreviousMode;
+ NTSTATUS Status;
+ PAGED_CODE();
+
+ PreviousMode = ExGetPreviousMode();
+
+ /* Obtain the thread object from the handle */
+ Status = ObReferenceObjectByHandle(ThreadHandle,
+ THREAD_IMPERSONATE,
+ PsThreadType,
+ PreviousMode,
+ (PVOID*)&Thread,
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtImpersonateAnonymousToken(): Failed to reference the object (Status 0x%lx)\n", Status);
+ return Status;
+ }
+
+ /* Call the private routine to impersonate the token */
+ Status = SepImpersonateAnonymousToken(Thread, PreviousMode);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtImpersonateAnonymousToken(): Failed to impersonate the token (Status 0x%lx)\n", Status);
+ }
+
+ ObDereferenceObject(Thread);
+ return Status;
}
/* EOF */
diff --git a/sdk/include/ndk/sefuncs.h b/sdk/include/ndk/sefuncs.h
index 96164320acc..8907bbc4e51 100644
--- a/sdk/include/ndk/sefuncs.h
+++ b/sdk/include/ndk/sefuncs.h
@@ -239,7 +239,7 @@ NTSYSCALLAPI
NTSTATUS
NTAPI
NtImpersonateAnonymousToken(
- _In_ HANDLE Thread
+ _In_ HANDLE ThreadHandle
);
__kernel_entry
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c3adff41b4b851e101b90…
commit c3adff41b4b851e101b904d0878b3334ea009785
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Apr 27 18:45:24 2021 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Tue Apr 27 18:45:24 2021 +0900
[CMDUTILS][FC] Forgot to add a line break to IDS_RESYNCH_FAILED
CORE-17500
---
base/applications/cmdutils/fc/lang/bg-BG.rc | 2 +-
base/applications/cmdutils/fc/lang/cs-CZ.rc | 2 +-
base/applications/cmdutils/fc/lang/de-DE.rc | 2 +-
base/applications/cmdutils/fc/lang/el-GR.rc | 2 +-
base/applications/cmdutils/fc/lang/en-GB.rc | 2 +-
base/applications/cmdutils/fc/lang/en-US.rc | 2 +-
base/applications/cmdutils/fc/lang/es-ES.rc | 2 +-
base/applications/cmdutils/fc/lang/et-EE.rc | 2 +-
base/applications/cmdutils/fc/lang/fr-FR.rc | 2 +-
base/applications/cmdutils/fc/lang/he-IL.rc | 2 +-
base/applications/cmdutils/fc/lang/hu-HU.rc | 2 +-
base/applications/cmdutils/fc/lang/id-ID.rc | 2 +-
base/applications/cmdutils/fc/lang/it-IT.rc | 2 +-
base/applications/cmdutils/fc/lang/ja-JP.rc | 2 +-
base/applications/cmdutils/fc/lang/nl-NL.rc | 2 +-
base/applications/cmdutils/fc/lang/no-NO.rc | 2 +-
base/applications/cmdutils/fc/lang/pl-PL.rc | 2 +-
base/applications/cmdutils/fc/lang/pt-BR.rc | 2 +-
base/applications/cmdutils/fc/lang/pt-PT.rc | 2 +-
base/applications/cmdutils/fc/lang/ro-RO.rc | 2 +-
base/applications/cmdutils/fc/lang/ru-RU.rc | 2 +-
base/applications/cmdutils/fc/lang/sk-SK.rc | 2 +-
base/applications/cmdutils/fc/lang/sq-AL.rc | 2 +-
base/applications/cmdutils/fc/lang/sv-SE.rc | 2 +-
base/applications/cmdutils/fc/lang/tr-TR.rc | 2 +-
base/applications/cmdutils/fc/lang/uk-UA.rc | 2 +-
base/applications/cmdutils/fc/lang/zh-CN.rc | 2 +-
base/applications/cmdutils/fc/lang/zh-TW.rc | 2 +-
28 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/base/applications/cmdutils/fc/lang/bg-BG.rc b/base/applications/cmdutils/fc/lang/bg-BG.rc
index b735ba3a5c3..f0c672ff4ae 100644
--- a/base/applications/cmdutils/fc/lang/bg-BG.rc
+++ b/base/applications/cmdutils/fc/lang/bg-BG.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/cs-CZ.rc b/base/applications/cmdutils/fc/lang/cs-CZ.rc
index 841bf71099f..b5bf38399c7 100644
--- a/base/applications/cmdutils/fc/lang/cs-CZ.rc
+++ b/base/applications/cmdutils/fc/lang/cs-CZ.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/de-DE.rc b/base/applications/cmdutils/fc/lang/de-DE.rc
index 212517a82f6..d4449b25972 100644
--- a/base/applications/cmdutils/fc/lang/de-DE.rc
+++ b/base/applications/cmdutils/fc/lang/de-DE.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/el-GR.rc b/base/applications/cmdutils/fc/lang/el-GR.rc
index e08f9a71acd..060954fec8e 100644
--- a/base/applications/cmdutils/fc/lang/el-GR.rc
+++ b/base/applications/cmdutils/fc/lang/el-GR.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/en-GB.rc b/base/applications/cmdutils/fc/lang/en-GB.rc
index 8dbf20a4107..3fa575f8999 100644
--- a/base/applications/cmdutils/fc/lang/en-GB.rc
+++ b/base/applications/cmdutils/fc/lang/en-GB.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/en-US.rc b/base/applications/cmdutils/fc/lang/en-US.rc
index 6c8516297b3..ae4951d9450 100644
--- a/base/applications/cmdutils/fc/lang/en-US.rc
+++ b/base/applications/cmdutils/fc/lang/en-US.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/es-ES.rc b/base/applications/cmdutils/fc/lang/es-ES.rc
index 90585e2ee90..451b19b834a 100644
--- a/base/applications/cmdutils/fc/lang/es-ES.rc
+++ b/base/applications/cmdutils/fc/lang/es-ES.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/et-EE.rc b/base/applications/cmdutils/fc/lang/et-EE.rc
index 3a21843b142..7d7aeab13ba 100644
--- a/base/applications/cmdutils/fc/lang/et-EE.rc
+++ b/base/applications/cmdutils/fc/lang/et-EE.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/fr-FR.rc b/base/applications/cmdutils/fc/lang/fr-FR.rc
index 3b7f679902e..01b6e46fa77 100644
--- a/base/applications/cmdutils/fc/lang/fr-FR.rc
+++ b/base/applications/cmdutils/fc/lang/fr-FR.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/he-IL.rc b/base/applications/cmdutils/fc/lang/he-IL.rc
index c4269568939..ab1687c260d 100644
--- a/base/applications/cmdutils/fc/lang/he-IL.rc
+++ b/base/applications/cmdutils/fc/lang/he-IL.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/hu-HU.rc b/base/applications/cmdutils/fc/lang/hu-HU.rc
index f70049886fb..a9ea667ed9e 100644
--- a/base/applications/cmdutils/fc/lang/hu-HU.rc
+++ b/base/applications/cmdutils/fc/lang/hu-HU.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/id-ID.rc b/base/applications/cmdutils/fc/lang/id-ID.rc
index af3129eb126..a97dfa3cafb 100644
--- a/base/applications/cmdutils/fc/lang/id-ID.rc
+++ b/base/applications/cmdutils/fc/lang/id-ID.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/it-IT.rc b/base/applications/cmdutils/fc/lang/it-IT.rc
index be1e71e0081..ebffa3679c8 100644
--- a/base/applications/cmdutils/fc/lang/it-IT.rc
+++ b/base/applications/cmdutils/fc/lang/it-IT.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/ja-JP.rc b/base/applications/cmdutils/fc/lang/ja-JP.rc
index 1e261c1df4b..0d4de1467e0 100644
--- a/base/applications/cmdutils/fc/lang/ja-JP.rc
+++ b/base/applications/cmdutils/fc/lang/ja-JP.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/nl-NL.rc b/base/applications/cmdutils/fc/lang/nl-NL.rc
index 631853f04da..381006a8dd7 100644
--- a/base/applications/cmdutils/fc/lang/nl-NL.rc
+++ b/base/applications/cmdutils/fc/lang/nl-NL.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/no-NO.rc b/base/applications/cmdutils/fc/lang/no-NO.rc
index c0da37bf2d2..00618a7fd47 100644
--- a/base/applications/cmdutils/fc/lang/no-NO.rc
+++ b/base/applications/cmdutils/fc/lang/no-NO.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/pl-PL.rc b/base/applications/cmdutils/fc/lang/pl-PL.rc
index 1d537912716..bd73f2ed521 100644
--- a/base/applications/cmdutils/fc/lang/pl-PL.rc
+++ b/base/applications/cmdutils/fc/lang/pl-PL.rc
@@ -44,5 +44,5 @@ FC /B [dysk1:][ścieżka1]plik1 [dysk2:][ścieżka2]plik2\n\
IDS_CANT_USE_WILDCARD "Symbole wieloznaczne ('*' i '?') nie są jeszcze obsługiwane\n"
IDS_DIFFERENT "FC: pliki %ls i %ls różnią się\n"
IDS_TOO_LARGE "FC: plik %ls jest za duży\n"
- IDS_RESYNCH_FAILED "Ponowna synchronizacja nie powiodła się. Pliki za bardzo się różnią."
+ IDS_RESYNCH_FAILED "Ponowna synchronizacja nie powiodła się. Pliki za bardzo się różnią.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/pt-BR.rc b/base/applications/cmdutils/fc/lang/pt-BR.rc
index 1a8ecab4a15..f74d8d6a2df 100644
--- a/base/applications/cmdutils/fc/lang/pt-BR.rc
+++ b/base/applications/cmdutils/fc/lang/pt-BR.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/pt-PT.rc b/base/applications/cmdutils/fc/lang/pt-PT.rc
index ab2ed8d3ab5..a7ceb26ca2b 100644
--- a/base/applications/cmdutils/fc/lang/pt-PT.rc
+++ b/base/applications/cmdutils/fc/lang/pt-PT.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/ro-RO.rc b/base/applications/cmdutils/fc/lang/ro-RO.rc
index 4a245229da4..55b992cd071 100644
--- a/base/applications/cmdutils/fc/lang/ro-RO.rc
+++ b/base/applications/cmdutils/fc/lang/ro-RO.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/ru-RU.rc b/base/applications/cmdutils/fc/lang/ru-RU.rc
index f0eaae192e6..b3f0698943c 100644
--- a/base/applications/cmdutils/fc/lang/ru-RU.rc
+++ b/base/applications/cmdutils/fc/lang/ru-RU.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/sk-SK.rc b/base/applications/cmdutils/fc/lang/sk-SK.rc
index 3e317faecee..d66a8042344 100644
--- a/base/applications/cmdutils/fc/lang/sk-SK.rc
+++ b/base/applications/cmdutils/fc/lang/sk-SK.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/sq-AL.rc b/base/applications/cmdutils/fc/lang/sq-AL.rc
index 7301e888092..cf7c458382a 100644
--- a/base/applications/cmdutils/fc/lang/sq-AL.rc
+++ b/base/applications/cmdutils/fc/lang/sq-AL.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/sv-SE.rc b/base/applications/cmdutils/fc/lang/sv-SE.rc
index 09012176796..dc3fb6647ba 100644
--- a/base/applications/cmdutils/fc/lang/sv-SE.rc
+++ b/base/applications/cmdutils/fc/lang/sv-SE.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/tr-TR.rc b/base/applications/cmdutils/fc/lang/tr-TR.rc
index 379bd46f38c..04dfac5fdf7 100644
--- a/base/applications/cmdutils/fc/lang/tr-TR.rc
+++ b/base/applications/cmdutils/fc/lang/tr-TR.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/uk-UA.rc b/base/applications/cmdutils/fc/lang/uk-UA.rc
index 89c45b78eb6..19f43286905 100644
--- a/base/applications/cmdutils/fc/lang/uk-UA.rc
+++ b/base/applications/cmdutils/fc/lang/uk-UA.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/zh-CN.rc b/base/applications/cmdutils/fc/lang/zh-CN.rc
index 28d7480b4ba..1909aead09f 100644
--- a/base/applications/cmdutils/fc/lang/zh-CN.rc
+++ b/base/applications/cmdutils/fc/lang/zh-CN.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
diff --git a/base/applications/cmdutils/fc/lang/zh-TW.rc b/base/applications/cmdutils/fc/lang/zh-TW.rc
index f0876f11976..f790f60dad4 100644
--- a/base/applications/cmdutils/fc/lang/zh-TW.rc
+++ b/base/applications/cmdutils/fc/lang/zh-TW.rc
@@ -37,5 +37,5 @@ FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ IDS_RESYNCH_FAILED "Resynch failed. Files are too different.\n"
END
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=622c226e2ed1ea6c44374…
commit 622c226e2ed1ea6c44374d334cc33ba9c788d54a
Author: Piotr Hetnarowicz <40692062+pithwz(a)users.noreply.github.com>
AuthorDate: Tue Apr 27 11:20:56 2021 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Apr 27 11:20:56 2021 +0200
[FC] Add the Polish translation (#3629)
---
base/applications/cmdutils/fc/lang/pl-PL.rc | 73 ++++++++++++++++-------------
1 file changed, 40 insertions(+), 33 deletions(-)
diff --git a/base/applications/cmdutils/fc/lang/pl-PL.rc b/base/applications/cmdutils/fc/lang/pl-PL.rc
index cada1840f52..1d537912716 100644
--- a/base/applications/cmdutils/fc/lang/pl-PL.rc
+++ b/base/applications/cmdutils/fc/lang/pl-PL.rc
@@ -1,41 +1,48 @@
+/*
+ * PROJECT: ReactOS FC Command
+ * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: Polish language translation
+ * TRANSLATORS: Copyright 2021 Piotr Hetnarowicz <piotrhwz(a)gmail.com>
+ */
+
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
- IDS_USAGE "Compares two files or sets of files and displays the differences between\n\
-them\n\
+ IDS_USAGE "Porównuje dwa pliki lub zestawy plików i wyświetla różnice między\n\
+nimi\n\
\n\
FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]\n\
- [drive1:][path1]filename1 [drive2:][path2]filename2\n\
-FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
+ [dysk1:][ścieżka1]plik1 [dysk2:][ścieżka2]plik2\n\
+FC /B [dysk1:][ścieżka1]plik1 [dysk2:][ścieżka2]plik2\n\
\n\
- /A Displays only first and last lines for each set of differences.\n\
- /B Performs a binary comparison.\n\
- /C Disregards the case of letters.\n\
- /L Compares files as ASCII text.\n\
- /LBn Sets the maximum consecutive mismatches to the specified\n\
- number of lines (default: 100).\n\
- /N Displays the line numbers on an ASCII comparison.\n\
- /OFF[LINE] Doesn't skip files with offline attribute set.\n\
- /T Doesn't expand tabs to spaces (default: expand).\n\
- /U Compare files as UNICODE text files.\n\
- /W Compresses white space (tabs and spaces) for comparison.\n\
- /nnnn Specifies the number of consecutive lines that must match\n\
- after a mismatch (default: 2).\n\
- [drive1:][path1]filename1\n\
- Specifies the first file or set of files to compare.\n\
- [drive2:][path2]filename2\n\
- Specifies the second file or set of files to compare.\n"
- IDS_NO_DIFFERENCE "FC: no differences encountered\n"
- IDS_LONGER_THAN "FC: %ls longer than %ls\n"
- IDS_COMPARING "Comparing files %ls and %ls\n"
- IDS_OUT_OF_MEMORY "FC: Out of memory\n"
- IDS_CANNOT_READ "FC: cannot read from %ls\n"
- IDS_INVALID_SWITCH "FC: Invalid Switch\n"
- IDS_CANNOT_OPEN "FC: cannot open %ls - No such file or folder\n"
- IDS_NEEDS_FILES "FC: Insufficient number of file specifications\n"
- IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
- IDS_DIFFERENT "FC: File %ls and %ls are different\n"
- IDS_TOO_LARGE "FC: File %ls too large\n"
- IDS_RESYNCH_FAILED "Resynch failed. Files are too different."
+ /A Wyświetla tylko pierwszy i ostatni wiersz każdego zestawu różnic.\n\
+ /B Wykonuje porównanie binarne.\n\
+ /C Nie rozróżnia wielkich i małych liter.\n\
+ /L Porównuje pliki jako tekst ASCII.\n\
+ /LBn Ustala maksymalną liczbę kolejnych wystąpień niezgodności\n\
+ na określoną liczbę wierszy (domyślnie: 100).\n\
+ /N Przy porównaniu ASCII wyświetla numery wierszy.\n\
+ /OFF[LINE] Nie pomija plików z ustawionym atrybutem przesunięcia.\n\
+ /T Nie zamienia tabulatorów na spacje (domyślnie: zamienia).\n\
+ /U Porównuje pliki jako pliki tekstowe UNICODE.\n\
+ /W Kompresuje do porównania białe znaki (tabulatory i spacje).\n\
+ /nnnn Określa liczbę kolejnych wierszy, które muszą być zgodne\n\
+ po wystąpieniu niezgodności (domyślnie: 2).\n\
+ [dysk1:][ścieżka1]plik1\n\
+ Określa pierwszy plik lub zestaw plików do porównania.\n\
+ [dysk2:][ścieżka2]plik2\n\
+ Określa drugi plik lub zestaw plików do porównania.\n"
+ IDS_NO_DIFFERENCE "FC: nie stwierdzono różnic\n"
+ IDS_LONGER_THAN "FC: %ls jest dłuższy niż %ls\n"
+ IDS_COMPARING "Porównywanie plików %ls i %ls\n"
+ IDS_OUT_OF_MEMORY "FC: Za mało pamięci\n"
+ IDS_CANNOT_READ "FC: nie można otworzyć %ls\n"
+ IDS_INVALID_SWITCH "FC: nieprawidłowy przełącznik\n"
+ IDS_CANNOT_OPEN "FC: nie można otworzyć %ls - nie ma takiego pliku lub folderu\n"
+ IDS_NEEDS_FILES "FC: nie określono wystarczającej liczby plików\n"
+ IDS_CANT_USE_WILDCARD "Symbole wieloznaczne ('*' i '?') nie są jeszcze obsługiwane\n"
+ IDS_DIFFERENT "FC: pliki %ls i %ls różnią się\n"
+ IDS_TOO_LARGE "FC: plik %ls jest za duży\n"
+ IDS_RESYNCH_FAILED "Ponowna synchronizacja nie powiodła się. Pliki za bardzo się różnią."
END