Giter Club home page Giter Club logo

python-utmp's People

Contributors

garabik avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

kartikeyap

python-utmp's Issues

Adding an entry

I have tried adding the following entry:

from utmp import UtmpRecord
r = UtmpRecord()
r.pututline(dict(ut_type=utmp.USER_PROCESS, ut_pid=1111, ut_line="",  ut_id=":10", ut_user="stdedos", ut_host="desktop", ut_exit=(0, 0), ut_session=8888, ut_tv=(1583137777, 333333), ut_addr_v6=(0, 0, 0, 0)))
r.endutent()

but it's not coming on w command. There seems to be no error or raise.

Additionally, there are no examples using pututline. Could you help / explain what am I doing wrong?

On Ubuntu Bionic, using python3.7 (3.6, 3.8 also installed, but only 3.6 is getting detected for the purposes of apt-get installation)

makeconst.c: warning: format '%i' expects argument of type 'int'

When I build python-utmp package in Fedora, there is reported a following warning:

$ rpmbuild -ba SPECS/python-utmp.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.zmkJXv
+ umask 022
+ cd /home/makerpm/rpmbuild/BUILD
+ cd /home/makerpm/rpmbuild/BUILD
+ rm -rf python-utmp
+ /usr/bin/gzip -dc /home/makerpm/rpmbuild/SOURCES/python-utmp_0.8.2.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd python-utmp
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.6WXr7b
+ umask 022
+ cd /home/makerpm/rpmbuild/BUILD
+ cd python-utmp
+ make -f Makefile.glibc 'DEFINES= 		-D_HAVE_UT_SESSION -D_HAVE_UT_ADDR_V6 -D_HAVE_UT_EXIT 		-D_HAVE_UT_HOST -D_HAVE_UT_ID -D_HAVE_UT_TV -D_HAVE_UT_USER 		-D_HAVE_UTMPNAME -D_HAVE_SETUTENT -D_HAVE_GETUTENT -D_HAVE_ENDUTENT 		-D_HAVE_GETUTID -D_HAVE_GETUTLINE -D_HAVE_PUTUTLINE 	-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' PYTHONVER=2.7
gcc  -g -Wall -I/usr/include/python2.7/ -D_HAVE_UT_SESSION -D_HAVE_UT_ADDR_V6 -D_HAVE_UT_EXIT 		-D_HAVE_UT_HOST -D_HAVE_UT_ID -D_HAVE_UT_TV -D_HAVE_UT_USER 		-D_HAVE_UTMPNAME -D_HAVE_SETUTENT -D_HAVE_GETUTENT -D_HAVE_ENDUTENT 		-D_HAVE_GETUTID -D_HAVE_GETUTLINE -D_HAVE_PUTUTLINE 		-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fpic -c utmpaccessmodule.c 
gcc  -g -Wall -I/usr/include/python2.7/ -D_HAVE_UT_SESSION -D_HAVE_UT_ADDR_V6 -D_HAVE_UT_EXIT 		-D_HAVE_UT_HOST -D_HAVE_UT_ID -D_HAVE_UT_TV -D_HAVE_UT_USER 		-D_HAVE_UTMPNAME -D_HAVE_SETUTENT -D_HAVE_GETUTENT -D_HAVE_ENDUTENT 		-D_HAVE_GETUTID -D_HAVE_GETUTLINE -D_HAVE_PUTUTLINE 		-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic  -fpic -shared utmpaccessmodule.o -o utmpaccessmodule.so
./makeconst.sh -g -Wall -I/usr/include/python2.7/ -D_HAVE_UT_SESSION -D_HAVE_UT_ADDR_V6 -D_HAVE_UT_EXIT 		-D_HAVE_UT_HOST -D_HAVE_UT_ID -D_HAVE_UT_TV -D_HAVE_UT_USER 		-D_HAVE_UTMPNAME -D_HAVE_SETUTENT -D_HAVE_GETUTENT -D_HAVE_ENDUTENT 		-D_HAVE_GETUTID -D_HAVE_GETUTLINE -D_HAVE_PUTUTLINE 		-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
makeconst.c: In function 'main':
makeconst.c:28:18: warning: format '%i' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=]
     PRL(UT_IDSIZE);
                  ^
makeconst.c:6:24: note: in definition of macro 'PRL'
 #define PRL(s) printf(#s" = %i\n", s);
                        ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.