public inbox for [email protected]  
help / color / mirror / Atom feed
From: Khushboo Vashi <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAmin4][Patch] - Kerberos support for Windows Installer
Date: Thu, 21 Jan 2021 15:46:44 +0530
Message-ID: <CAFOhELfFzkwDBX22K3fsTg+6piPkimvXPw1JVejVauWTsCTt8Q@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxozOnj+RFycxhmmni-mYXAn-Jw58bwWgXnFMqDkrXimSnQ@mail.gmail.com>
References: <CAFOhELd8YNNq5Ot-qUD0QOP_Of=iKadaTrC9trJVLENttErGsg@mail.gmail.com>
	<CA+OCxozOnj+RFycxhmmni-mYXAn-Jw58bwWgXnFMqDkrXimSnQ@mail.gmail.com>

Hi Dave,

Please find the attached updated patch.

Thanks,
Khushbo

On Thu, Jan 21, 2021 at 3:17 PM Dave Page <[email protected]> wrote:

> Hi
>
> On Thu, Jan 21, 2021 at 7:11 AM Khushboo Vashi <
> [email protected]> wrote:
>
>> Hi,
>>
>> Please find the attached patch to add the Kerberos support in the Windows
>> installer script.
>>
>
> A couple of comments:
>
> - The file names should be in lower case in the COPY lines. It will still
> work of course, but for consistency and style...
>
Fixed.

> - There's no check that the environment variable is set to a valid value.
> For others, we have code block like:
>
> Fixed.

> IF NOT EXIST "%PGADMIN_QT_DIR%" (
>     ECHO !PGADMIN_QT_DIR! does not exist.
>     ECHO Please install Qt and set the PGADMIN_QT_DIR environment variable.
>     EXIT /B 1
> )
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>


Attachments:

  [application/octet-stream] kerberos_win_dep_ver1.patch (2.5K, 3-kerberos_win_dep_ver1.patch)
  download | inline diff:
diff --git a/Make.bat b/Make.bat
index b5d2901c1..d6b13fff8 100644
--- a/Make.bat
+++ b/Make.bat
@@ -55,6 +55,7 @@ REM Main build sequence Ends
     ECHO Configuring the environment...
     IF "%PGADMIN_PYTHON_DIR%" == ""   SET "PGADMIN_PYTHON_DIR=C:\Python38"
     IF "%PGADMIN_QT_DIR%" == ""       SET "PGADMIN_QT_DIR=C:\Qt\5.14.2\msvc2017_64"
+    IF "%PGADMIN_KRB5_DIR%" == ""     SET "PGADMIN_KRB5_DIR=C:\Program Files\MIT\Kerberos"
     IF "%PGADMIN_POSTGRES_DIR%" == "" SET "PGADMIN_POSTGRES_DIR=C:\Program Files (x86)\PostgreSQL\12"
     IF "%PGADMIN_INNOTOOL_DIR%" == "" SET "PGADMIN_INNOTOOL_DIR=C:\Program Files (x86)\Inno Setup 6"
     IF "%PGADMIN_VCREDIST_DIR%" == "" SET "PGADMIN_VCREDIST_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Redist\MSVC\14.16.27012"
@@ -97,6 +98,7 @@ REM Main build sequence Ends
     ECHO Python version:            %PYTHON_MAJOR%.%PYTHON_MINOR%
     ECHO.
     ECHO Qt directory:              %PGADMIN_QT_DIR%
+    ECHO KRB5 directory:            %PGADMIN_KRB5_DIR%
     ECHO PostgreSQL directory:      %PGADMIN_POSTGRES_DIR%
     ECHO.
     ECHO VC++ redist directory:     %PGADMIN_VCREDIST_DIR%
@@ -129,6 +131,12 @@ REM Main build sequence Ends
         EXIT /B 1
     )
 
+    IF NOT EXIST "%PGADMIN_KRB5_DIR%" (
+        ECHO !PGADMIN_KRB5_DIR! does not exist.
+        ECHO Please install Kfw (Kerberos) and set the PGADMIN_KRB5_DIR environment variable.
+        EXIT /B 1
+    )
+
     IF NOT EXIST "%PGADMIN_QT_DIR%\bin\qmake.exe" (
         ECHO !QMAKE! does not exist.
         ECHO Please install Qt and set the PGADMIN_QT_DIR environment variable.
@@ -268,6 +276,15 @@ REM Main build sequence Ends
     ECHO [Paths] > "%BUILDROOT%\runtime\qt.conf"
     ECHO Plugins=plugins >> "%BUILDROOT%\runtime\qt.conf"
 
+    ECHO Staging Kerberos components...
+    IF "%ARCHITECTURE%" == "x64" (
+        COPY "%PGADMIN_KRB5_DIR%\bin\kinit.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
+        COPY "%PGADMIN_KRB5_DIR%\bin\krb5_64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
+        COPY "%PGADMIN_KRB5_DIR%\bin\comerr64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
+        COPY "%PGADMIN_KRB5_DIR%\bin\k5sprt64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
+        COPY "%PGADMIN_KRB5_DIR%\bin\gssapi64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
+    )
+
     ECHO Staging PostgreSQL components...
     COPY "%PGADMIN_POSTGRES_DIR%\bin\libpq.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
     IF "%ARCHITECTURE%" == "x64" (


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAmin4][Patch] - Kerberos support for Windows Installer
  In-Reply-To: <CAFOhELfFzkwDBX22K3fsTg+6piPkimvXPw1JVejVauWTsCTt8Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox