Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amBbL-0007C1-GA for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Apr 2016 02:47:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1amBbK-00071w-73 for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Apr 2016 02:47:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1amBZy-0005YN-4N for pgsql-hackers@postgresql.org; Sat, 02 Apr 2016 02:46:26 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1amBZq-0003IQ-HU for pgsql-hackers@postgresql.org; Sat, 02 Apr 2016 02:46:25 +0000 Received: by mail-pf0-x22b.google.com with SMTP id n5so103260254pfn.2 for ; Fri, 01 Apr 2016 19:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+U3IEkcMApogwnIiaS8vZdRldHQeX2Pq7Bp87Ntbg3g=; b=AdHaZdf0MbkMqojBV0Dj3V3xNYyhZu+l3sGH6H/diEm7V5ESi7pU7uxuo0OHNLgu9O rzfS03HpVAOHirIz/7xaIeuXRyaG4DIxzbH/v6GetHnkz3+m46m3NbKCmwFgTDRA4THb 5hQ7HMFaLGn9NvZQekAVDPZ/mpVIWIyixdqZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+U3IEkcMApogwnIiaS8vZdRldHQeX2Pq7Bp87Ntbg3g=; b=XRYyx/qPrA/CP/jdvCpJUZ0oXsyv8fMGScKETEWFqfiYRovLN/+TzK5wBMo6g0Ubpv QaNp/jFbwVuIGHKQwEbynrcmkxxWxVAnh44oLs+rSX4iUkn2xGFWv6Sh1/6KxlZPmxiA OznXWokxMyIMHGAe20+SOrts/lcZLlwIEBYjjxzUznSQ6s6OVzyB1IgNylFzODCQ+hNb zPqf1L3XlfOml+qKQaQMwYbeJrpg+11SwyyIgEMmHntrjXKGjY7TwRzv/WMQzSGL1ppH 3ZVdqtLIW1hIPIOoDzzUn18ALIz1aZioIbJPvxor9ipXeU8gUxUk38/TF4+lROWYW3mM L0cA== X-Gm-Message-State: AD7BkJId5KTA95TAyVyo/aE95OeTpZTgNghNS1vXAuh6tUIwG+ADysaNwQ8tXRuZLPZMig== X-Received: by 10.98.68.91 with SMTP id r88mr3188286pfa.12.1459565175573; Fri, 01 Apr 2016 19:46:15 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id dg1sm24957274pad.18.2016.04.01.19.46.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Apr 2016 19:46:14 -0700 (PDT) Date: Fri, 1 Apr 2016 22:46:13 -0400 From: Noah Misch To: Stephen Frost Cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Refer to a TOKEN_USER payload as a "token user, " not as a "user Message-ID: <20160402024613.GC1545657@tornado.leadboat.com> References: <20160402021211.GH10850@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160402021211.GH10850@tamriel.snowman.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Fri, Apr 01, 2016 at 10:12:12PM -0400, Stephen Frost wrote: > * Noah Misch (noah@leadboat.com) wrote: > > Refer to a TOKEN_USER payload as a "token user," not as a "user token". > > > > This corrects messages for can't-happen errors. The corresponding "user > > token" appears in the HANDLE argument of GetTokenInformation(). > > I'm not at all convinced that this is an improvement. I understand that > it's a "can't happen" case, but we're calling out to a OS function and > as much as things "can't happen" they do, in fact, occationally happen, They do, yes. I mentioned that for the purpose of hinting that this commit does not warrant release notes coverage. > and there's no such thing as a "token user" concept. There's an enum, > one value of which is "TokenUser" and that's what we're asking the OS to > provide us info about, but I'd argue that if we're going to refer to the > textual enum representation then we should spell it just exactly as the > enum has it. > > If we don't want to use "TokenUser" then I'd suggest that "user token" > is a more accurate term to use, as we had before this change. There is > no such thing as a "token user", as far as I'm aware, in GSSAPI, SSPI, > or general access token lingo. "User token" has definitely been wrong. We already possess the user token at the moments of these error messages, because we pass the user token as the first GetTokenInformation() argument. We're retrieving information about the "user" that pertains to a particular "token", hence "token user." A verbose description is "could not get user associated with access token." I see some advantages of writing "TokenUser", as you propose. However, our error style guide says "Avoid mentioning called function names, either; instead say what the code was trying to do." Mentioning an enumerator name is morally similar to mentioning a function name. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers