geteuid call

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

geteuid call

Tal Tabakman-2
Hi Guys,
we have an application that generates  database in sqlite format,
at customer, we saw while profiling that the geteuid() call done in
sqlite3.c is showing up rather high in our profiling report, any idea why ?
what is this used for ?
thanks
Tal
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: geteuid call

Richard Hipp-3
On Sat, Aug 16, 2014 at 3:01 PM, Tal Tabakman <[hidden email]>
wrote:

> Hi Guys,
> we have an application that generates  database in sqlite format,
> at customer, we saw while profiling that the geteuid() call done in
> sqlite3.c is showing up rather high in our profiling report, any idea why ?
> what is this used for ?
>

It comes from here:
http://www.sqlite.org/src/artifact/bd7df3094a609?ln=314-325

The posixFchown() function is used to ensure that the ownership of newly
created journal files match the ownership of the database file if the
process is running as root.




> thanks
> Tal
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: geteuid call

Simon Slavin-3

On 16 Aug 2014, at 8:08pm, Richard Hipp <[hidden email]> wrote:

> It comes from here:
> http://www.sqlite.org/src/artifact/bd7df3094a609?ln=314-325
>
> The posixFchown() function is used to ensure that the ownership of newly
> created journal files match the ownership of the database file if the
> process is running as root.

The question becomes "Are you running as root ?  If so, do you have a good reason to be running as root ?"

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: geteuid call

Tal Tabakman-2
In reply to this post by Tal Tabakman-2
Hi Simon

per your question

he question becomes "Are you running as root ?  If so, do you have a
good reason to be running as root ?"

No, I am not running as root. I am running in one of those secure
chamber at customer site.can it be related ?




On Sat, Aug 16, 2014 at 10:01 PM, Tal Tabakman <[hidden email]>
wrote:

> Hi Guys,
> we have an application that generates  database in sqlite format,
> at customer, we saw while profiling that the geteuid() call done in
> sqlite3.c is showing up rather high in our profiling report, any idea why ?
> what is this used for ?
> thanks
> Tal
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: geteuid call

Simon Slavin-3

> On 16 Aug 2014, at 8:48pm, Tal Tabakman <[hidden email]> wrote:
>
>> he question becomes "Are you running as root ?  If so, do you have a
>> good reason to be running as root ?"
>
> No, I am not running as root. I am running in one of those secure
> chamber at customer site.can it be related ?

You should be finding only one geteuid() call each time SQLite tries to open a file.  So either geteuid() is taking a long time to execute, or you are doing a lot of opening and closing of files.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users