since-v8.diff.txt

text/plain

Filename: since-v8.diff.txt
Type: text/plain
Part: 0
Message: Re: [PoC] Federated Authn/z with OAUTHBEARER
1:  5f87f11b18e = 1:  5f87f11b18e Add minor-version counterpart to (PG_)MAJORVERSION
2:  4c9cc7f69af ! 2:  9e37fd7c217 oauth: Move the builtin flow into a separate module
    @@ configure.ac: if test "$PORTNAME" = "win32" ; then
     +if test "$with_libcurl" = yes ; then
     +  # Error out early if this platform can't support libpq-oauth.
     +  if test "$ac_cv_header_sys_event_h" != yes -a "$ac_cv_header_sys_epoll_h" != yes; then
    -+    AC_MSG_ERROR([client OAuth is not supported on this platform])
    ++    AC_MSG_ERROR([client-side OAuth is not supported on this platform])
     +  fi
     +fi
     +
    @@ meson.build: if not libcurlopt.disabled()
     +  if oauth_flow_supported
     +    cdata.set('USE_LIBCURL', 1)
     +  elif libcurlopt.enabled()
    -+    error('client OAuth is not supported on this platform')
    ++    error('client-side OAuth is not supported on this platform')
     +  endif
     +
      else
    @@ src/interfaces/libpq-oauth/oauth-curl.c: pg_fe_run_oauth_flow_impl(PGconn *conn)
      	 * also the documentation for struct async_ctx.
      	 */
      	if (actx->errctx)
    - 	{
    +-	{
     -		appendPQExpBufferStr(&conn->errorMessage,
     -							 libpq_gettext(actx->errctx));
     -		appendPQExpBufferStr(&conn->errorMessage, ": ");
    -+		appendPQExpBufferStr(errbuf, libpq_gettext(actx->errctx));
    -+		appendPQExpBufferStr(errbuf, ": ");
    - 	}
    +-	}
    ++		appendPQExpBuffer(errbuf, "%s: ", libpq_gettext(actx->errctx));
      
      	if (PQExpBufferDataBroken(actx->errbuf))
     -		appendPQExpBufferStr(&conn->errorMessage,
    @@ src/interfaces/libpq-oauth/oauth-curl.c: pg_fe_run_oauth_flow_impl(PGconn *conn)
      
      	if (actx->curl_err[0])
      	{
    - 		size_t		len;
    - 
    +-		size_t		len;
    +-
     -		appendPQExpBuffer(&conn->errorMessage,
     -						  " (libcurl: %s)", actx->curl_err);
     +		appendPQExpBuffer(errbuf, " (libcurl: %s)", actx->curl_err);
    @@ src/interfaces/libpq-oauth/oauth-curl.c: pg_fe_run_oauth_flow_impl(PGconn *conn)
      		/* Sometimes libcurl adds a newline to the error buffer. :( */
     -		len = conn->errorMessage.len;
     -		if (len >= 2 && conn->errorMessage.data[len - 2] == '\n')
    -+		len = errbuf->len;
    -+		if (len >= 2 && errbuf->data[len - 2] == '\n')
    ++		if (errbuf->len >= 2 && errbuf->data[errbuf->len - 2] == '\n')
      		{
     -			conn->errorMessage.data[len - 2] = ')';
     -			conn->errorMessage.data[len - 1] = '\0';
     -			conn->errorMessage.len--;
    -+			errbuf->data[len - 2] = ')';
    -+			errbuf->data[len - 1] = '\0';
    ++			errbuf->data[errbuf->len - 2] = ')';
    ++			errbuf->data[errbuf->len - 1] = '\0';
     +			errbuf->len--;
      		}
      	}