* check for superuser, bark if not. */
| 113 | * check for superuser, bark if not. |
| 114 | */ |
| 115 | static void |
| 116 | requireSuperuser(void) |
| 117 | { |
| 118 | if (!superuser()) |
| 119 | ereport(ERROR, |
| 120 | (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), |
| 121 | errmsg("only superuser may access generic file functions"))); |
| 122 | } |
| 123 | |
| 124 | |
| 125 |
no test coverage detected