Comments (9)
Currently statvfs is unimplemented. It's one of those TODO's we need to get to.
Can anyone else confirm the issue about the executable part? Mine seems to be working fine:
~# useradd myuser
~# su myuser
/root$ cd
~$ id
uid=1000(myuser) gid=1000(myuser) groups=1000(myuser)
~$ cat >hi.c <<_EOF
> #include <stdio.h>
> int main() {
> printf("hi\n");
> return 0;
> }
> _EOF
~$ gcc -o hi hi.c
~$ ./hi
hi
~$ ls -la
total 80
drwxr-sr-x 1 myuser myuser 8192 Nov 08 13:08 .
drwxr-xr-x 1 root root 8192 Nov 08 13:07 ..
-rwxr-xr-x 1 myuser myuser 11020 Nov 08 13:08 hi
-rw-r--r-- 1 myuser myuser 60 Nov 08 13:08 hi.c
I noticed your user ID is in the 500s. How did you create that user? It it possible that you are not the owner of your home directory?
from os.
statvfs is unimplemented
I was mislead by http://www.minocacorp.com/doc/1375/api/LIBC_API/element/364697/
which suggests it does exist. It was my error to not check the value returned by statvfs,
which is indeed non-zero. Is there a list of what parts of the API exist or do not exist that one
should consult before writing code? I well understand that you cannot implement everything
yesterday.
uid=501 is for historical reasons. Specified -u 501 parameter to useradd command.
I tried a new user (id 1000) and still the executable file produced by gcc is not executable.
Home directory ownership looks correct:
~$ ls -l /home
ls -l /home
total 16
drwxr-sr-x 1 ryniker ryniker 4096 Jan 01 11:40 ryniker
drwxr-sr-x 1 rynx rynx 4096 Jan 01 11:38 rynx
~$
Have you tried su as some user other than root? This fails:
~$ id
id
uid=501(ryniker) gid=501(ryniker) groups=501(ryniker)
~$ su rynx
su rynx
su: Error: Could not read password information for user 'rynx': Permission denied.
su: Incorrect password.
~$
Would you prefer this su issue in its own thread?
from os.
Usually we try not to add functions unless we implement them. I think statvfs was an exception because it was required to get one of our core packages to build, but wasn't strictly necessary for the operation of that package. If you do a grep for "TODO:" in apps/libc, you'll get a sense of the functions we haven't implemented yet (as well as a few other cleanup items in the C library).
I believe the su issue is an artifact of swiss not being setuid. If you do rm /bin/swiss; cp /bin/sh /bin/swiss; chmod u+s /bin/swiss
, then /bin/su, which is really a symlink to /bin/swiss, will run with setuid privileges. (The other swiss applets are programmed to drop their setuid privilege). You could create an issue to fix up the build process so that the init scripts make swiss setuid.
I did notice in playing with it that creating a new user, "su"ing into their account, and then trying to change their unset password doesn't seem to work. I forget exactly what the behavior is supposed to be, but that might warrant its own issue as well.
I'm still at a loss for why you can't chmod items in your home directory. Can you get a complete set of repro steps there?
from os.
swiss not being setuid
Clever thought, but no improvement.
~$ ls -l /bin/chmod
ls -l /bin/chmod
lrwxrwxr-x 1 root root 5 Dec 31 16:00 /bin/chmod -> swiss
~$ ls -l /bin/swiss
ls -l /bin/swiss
-rwsr-xr-x 1 root root 525752 Jan 01 10:31 /bin/swiss
~$ ls -l
ls -l
total 88
drwxr-xr-x 1 ryniker ryniker 0 Jan 01 09:54 c
-rw-r--r-- 1 ryniker ryniker 13196 Jan 01 10:25 statvfs
-rw-r--r-- 1 ryniker ryniker 666 Jan 01 10:24 statvfs.c
~$ chmod a+x statvfs
chmod a+x statvfs
chmod: Could not change mode of 'statvfs': Operation not permitted.
~$
This happens for every program produced by gcc. Use "opkg install gcc" then compile a simple program.
In my case:
gcc -o statvfs statvfs.c
I have not tried other platforms than the original Raspberry Pi (rpi.img).
from os.
Okay, I was able to reproduce this using the images from the website. We've done quite a bit of work since then, and I think this issue is fixed in the latest source. We should be putting out new 0.3 builds in the next few days. Hang tight until we've got that new build out (or building from source works too).
from os.
Can you give the new image on the website a shot?
from os.
The latest image at http://www.minocacorp.com/download/#raspberry-pi is 1944, which has no statvfs.
I suspect you mean another, later image... but I do not know its location.
from os.
Bad communication on my part, I was referring to the new images fixing the chmod problem, and su as a user other than root (you need to do rm /bin/swiss; cp /bin/sh /bin/swiss; chmod u+s /bin/swiss
first).
Statvfs still is not implemented. Sorry.
from os.
I'm going to close this as I think we've bottomed out on it. Feel free to re-open if needed.
from os.
Related Issues (20)
- usb2usb ftdi2ftdi HOT 6
- error.. HOT 5
- Need chgrp or equivalent HOT 3
- Add awk to the default Minoca build HOT 2
- Use LGPL v2.1 instead of v3 HOT 4
- mac toolchain problems HOT 3
- RPI1 image on website has private IP address in the 'opkg.conf' file. HOT 3
- Want to testing Minoca on mac directly using qemu HOT 5
- BopEfiGetDebugDevice in dbgser.c doesn't iterate through the list of handles. HOT 1
- Udoo (iMX6 Dual/Quad) support? HOT 1
- Alignment build error on Debian HOT 2
- Chalk missing HOT 2
- Is this based on reverse engineering of Windows? HOT 1
- Minoca Debugger HOT 1
- [Deleted]
- The opkg program doesn't run. HOT 5
- Linking - testmm: Fails HOT 2
- Assertion Failure: KernelUsage->HardPageFaults <= KernelUsage->PageFaults HOT 3
- An improper locking bug on the lock NewThread->StartMutex HOT 4
- Your website is down. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from os.