Re: [PATCHES] Run-as-admin warning for win32
Thomas Hallgren wrote: http://download.microsoft.com/download/1/b/8/1b8fc001-6f67-4ea1-b0f2-8add1da8cbc0/_Toc42414596 Link does not work. Exerpt: Unfortunately, these permissions are also the same permissions that allow power users to: ? Introduce Trojan horses that, if executed by administrators or other users, can compromise system and data security ? Make system-wide operating system and application changes that affect other users of the system Kind regards, Thomas Hallgren rant That pathetic thing called Windows security is getting to me. It is close to impossible to create a user, and once created, this user will not be capable of actually doing anything. Very flexible, very granular permissions system result in making it impossible for someone, us in this case, to find out whether we are over-priveleged. Well meaning, but horrible system, with even more horrible results. /rant Shachar -- Shachar Shemesh Lingnu Open Source Consulting http://www.lingnu.com/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] Run-as-admin warning for win32
1. You forgot to check localsystem, as well as domain admins. These two have even higher permissions than the ones you test for, and one of them is the default if Postgre ever makes it to become a service. 2. Are you sure Powerusers is such a good idea? It's the default for all non-admin users. When Postgres becomes a service, it's going to be relatively easy to configure it to run as a low-priv user. Until then, however, isn't it too difficult for admins to set up the system for it to run as a different user? Shachar Magnus Hagander wrote: For review, comments and possible application to HEAD. This code implements a warning when the postmaster is started as a high-privilege account on win32 (administrator or power users). Previously, postgresql has exited out on Unix when running as root - this is a similar check, with the following differences: * We do a ereport(WARNING) instead of exitting out. The reason for this is that we can expect there are win32 admins that will want to run the server with a high privilege account. Just sending a warning will permit this (say, when debugging etc, or if people are just too lazy to care), while clearly stating it's not a recommended way to do it. * The Unix check is directly in main.c. We cannot do this on win32, because at this stage we can only printf and exit. Win32 needs ereport. Consider when runinng as a service - before we have loaded up postgresql.conf and noticed we should write to the eventlog, we cannot inform the user in any way (stderr = /dev/null from a service by default). Therefor, the win32 check is in PostmasterMain. There might be a slightly better place to put it, not 100% sure about that.. The win32 specific code is mainly in the file security.c to go in src/backend/port/win32. //Magnus security.c admin_warning.patch ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster -- Shachar Shemesh Lingnu Open Source Consulting http://www.lingnu.com/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [PATCHES] Defining a tinyint data type - one byte unsigned
Tom Lane wrote: Shachar Shemesh [EMAIL PROTECTED] writes: Attached is a patch to implement tinyint. I don't think we've really solved the numeric-hierarchy casting problems well enough to be able to stand adding another member of the hierarchy. In particular, what impact is this going to have on implicit typing of integer constants? regards, tom lane The nice thing about a one byte integer is that it's at the very bottom of the food chain. Since casting upwards is implicit and downwards is explicit, NOTHING casts implicitly to it. As such I'm hoping (like I said in my original post - I'm no expert) that this will be a harmless addition. If there is anything you can think of that will allow me to verify this claim, do let me know. -- Shachar Shemesh Lingnu Open Systems Consulting http://www.lingnu.com/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] Defining a tinyint data type - one byte unsigned
Shachar Shemesh wrote: Tom Lane wrote: I don't think we've really solved the numeric-hierarchy casting problems well enough to be able to stand adding another member of the hierarchy. In particular, what impact is this going to have on implicit typing of integer constants? regards, tom lane The nice thing about a one byte integer is that it's at the very bottom of the food chain. Since casting upwards is implicit and downwards is explicit, NOTHING casts implicitly to it. As such I'm hoping (like I said in my original post - I'm no expert) that this will be a harmless addition. If there is anything you can think of that will allow me to verify this claim, do let me know. Hmm - replying to my own post. I did cut one corner, in that I did not implement tiny-int8 and tiny-non integers yet. That is, however, an implementation detail rather than a principal problem. If that is the whole problem, I'll add those as well. I would rather, before doing the extra work, hear that this is indeed all that is needed to get it in. Having said that, some sort of implicit casts of implicit casts results does seem necessary in postgres. I don't think that leaving this patch out will be the way to solve this. -- Shachar Shemesh Lingnu Open Systems Consulting http://www.lingnu.com/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Defining a tinyint data type - one byte unsigned
Shachar Shemesh wrote: Hmm - replying to my own post. I did cut one corner, in that I did not implement tiny-int8 and tiny-non integers yet. That is, however, an implementation detail rather than a principal problem. If that is the whole problem, I'll add those as well. I would rather, before doing the extra work, hear that this is indeed all that is needed to get it in. Replying to my own post again! The documentation for SQL Server says this (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ia-iz_3ss4.asp): Functions will return *bigint* only if the parameter expression is a *bigint* data type. SQL Server will not automatically promote other integer data types (*tinyint*, *smallint*, and *int*) to *bigint*. Perhaps Postgres is not alone with it's casting problems. -- Shachar Shemesh Lingnu Open Systems Consulting http://www.lingnu.com/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])